Skip to content

Instantly share code, notes, and snippets.

View redgluten's full-sized avatar
:octocat:
-> DROP ICE!

Gluten redgluten

:octocat:
-> DROP ICE!
View GitHub Profile
@redgluten
redgluten / markdown-surcharge.css
Last active August 29, 2015 14:07
Markdown surcharge
h1 {
text-align: center;
}
h1, h2, h3 {
font-family: Fira Sans;
}
p, li {
font-family: Fira Sans;
@redgluten
redgluten / php_method.sublime-snippet
Last active August 29, 2015 14:18
Sublime Text snippet for creating a new PHP method
<snippet>
<content><![CDATA[
${1:public} function ${2:methodName}(${3:argument})
{
${4:// code}
}
]]></content>
<tabTrigger>meth</tabTrigger>
<scope>source.php</scope>
</snippet>
@redgluten
redgluten / line_counter.sh
Created May 12, 2015 08:09
Count the number of lines of code from a specific file extension in a project
( find ./ -name '*.js' -print0 | xargs -0 cat ) | wc -l
{
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
"create_window_at_startup": false,
"default_line_ending": "unix",
"draw_white_space": "selection",
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"file_exclude_patterns":
// Check for correct phone or fax french format
Validator::extend('phone', function($attribute, $value, $parameters) {
return preg_match('/^0[1-9][0-9]{8}$/', strval($value));
});
/^0[1-9][0-9]{8}$/
" Syntax highlighting
" Enable syntax highighting
syntax enable
" 256 colours, please
set t_Co=256
" Enable line numbers on startup
set number
@redgluten
redgluten / global-homestead.sh
Created December 22, 2015 09:46 — forked from taylorotwell/global-homestead.sh
Global Homestead Without Composer
alias homestead='function __homestead() { (cd ~/Documents/Code/Homestead && vagrant $*); unset -f __homestead; }; __homestead'
# Usage
homestead up
homestead halt
# etc...
function dd($data) {
echo '<pre>';
die(var_dump($data));
echo'</pre>';
}