This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -rnw '/path/to/somewhere' -e "pattern" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function apply($filters = []){ | |
//if any filter is passed | |
foreach ($filters as $filter) { | |
if (method_exists($this, $filter)) { | |
call_user_func([$this, $filter]); | |
} else { | |
throw new ActivityBadFilterException($filter); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Research about: | |
- OOP PHP INHERITANCE | |
- OOP PHP INTERFACES | |
- Polymorphism | |
*/ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label>Checkbox 1</label> | |
<input id="checkbox-1" type="checkbox" v-model="my.checkbox.value"> | |
<label>Checkbox 2</label> | |
<input id="checkbox-2" type="checkbox" v-model="my.checkbox.value"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//example: | |
$query = Foo::where('id', '=', 1)->where('name', '=', 'bar'); | |
//would produce the following raw query: | |
//select * from foo where id = ? and name = ?; | |
dd(vsprintf(str_replace('?', '%s', $query->toSql()), collect($query->getBindings())->map(function($binding){ | |
return is_numeric($binding) ? $binding : "'{$binding}'"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
ROOTDIR=$PWD | |
INSPECTDIR="htdocs/ember_app" | |
LASTSHA=$(git fetch $1 && git log --oneline -n 1 | awk '{print $1}') | |
EXISTS=$(git branch -r --contains $LASTSHA) | |
if [ ${#EXISTS} -gt "0" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Alias for building local ember files. | |
alias ebl=""RETURNDIR=$PWD && cd /Users/anthonyrodriguez/code/sportsrecruits/local-site/www/sportsrecruits/htdocs/ember_app && ember build --output-path=dist-local --environment=local && cd $RETURNDIR" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find ./ -type f | while read file; do mv $file `echo $file | tr ' ' '_'` ; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in *; do mv $i `echo $i | tr [:upper:] [:lower:]`; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/sh | |
#directory: 2014/example.zip | |
find ./ -type f -name *.zip | awk -F'/' '{print $1}' | |
#the comand above would print out 2014 |