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
/^0[1-9][0-9]{8}$/
// 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));
});
{
"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":
@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
@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 / 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;