I hereby claim:
- I am skwi on github.
- I am skwi (https://keybase.io/skwi) on keybase.
- I have a public key ASCSZ4ZFmFM81IluDcO-QFo0AgLoxFMH7nPbH9kQH4OxYgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/sh | |
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | |
STAGED_FILES_CMD=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php` | |
# Determine if a file list is passed | |
if [ "$#" -eq 1 ] | |
then | |
oIFS=$IFS | |
IFS=' |
<script | |
type="text/javascript" | |
src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery{{ app.environment == 'dev' ? null : '.min' }}.js"> | |
</script> |
public function myfunction() { | |
switch(true) { | |
case $this->securityContext->isGranted('ROLE_1'){ | |
#code | |
break; | |
case $this->securityContext->isGranted('ROLE_2'){ | |
#code | |
break; | |
case $this->securityContext->isGranted('ROLE_3'){ | |
#code |
{ | |
"bold_folder_labels": true, | |
"caret_style": "wide", | |
"color_scheme": "Packages/Dayle Rees Color Schemes/Goldfish.tmTheme", | |
"detect_slow_plugins": false, | |
"drag_text": false, | |
"fade_fold_buttons": false, | |
"file_exclude_patterns": | |
[ | |
"app/cache", |
var confirmOnLeave = function(msg) { | |
window.onbeforeunload = function (e) { | |
e = e || window.event; | |
msg = msg || ''; | |
// For IE and Firefox | |
if (e) {e.returnValue = msg;} | |
// For Chrome and Safari |
/** | |
* Generates a random Password | |
* | |
* @param integer $length The password length (8 characters default) | |
* @return string The password | |
*/ | |
private function randomPassword($length = 8) | |
{ | |
$alphabet = "abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789"; |
$__string__ = preg_replace("/&#?[a-z0-9]{2,8};/i","",$__string__); |
Navigation: | |
cmd-p Goto Anything ('@' for functions, ':' for line number) | |
cmd-r Function finder | |
ctl-g Goto line number | |
cmd-sft-p Command palette | |
cmd-sft-f Find in Files | |
cmd-opt-r Toggle regex when finding | |
cmd-opt-# Columns | |
ctr-# Switch columns |
$ip = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; |