View watchmore.sh
sudo sysctl -w fs.inotify.max_user_watches=100000 |
View mymodule.module
function mymodule_preprocess_page(&$variables) { | |
if (isset($variables['node']) && $variables['node']->type == 'book') { | |
// Add js | |
drupal_add_js(drupal_get_path('module', 'mymodule') . '/mymodule.awesome.js'); | |
$variables['scripts'] = drupal_get_js(); | |
} | |
} |
View contido.sh
#!/bin/bash | |
primeiro=$1; | |
segundo=$2; | |
for linha in $(cat $primeiro); do | |
if ! [[ $(grep "^$linha$" $segundo) ]]; then | |
echo "$primeiro não está contido em $segundo"; | |
exit 1; | |
fi; | |
done; | |
exit 0; |
View challengeTableFilter.js
console.log("Initializing mySearch"); | |
var filter=document.getElementById('myfilter') | |
buildForm(filter, filterTable) | |
function filterTable(){ | |
this.table.setAttribute('id', 'deu-certo') |
View vimbug
vim $(newbug) |
View newbug
#!/bin/bash | |
hoje=`date +%Y-%m-%d` | |
LAST=$(find . -maxdepth 1 -name $hoje-"*.bug" -type f -printf "%p\n" | sed -e s/.\\/$hoje-//g -e s/.bug//g | sort -g | tail -1) | |
echo $hoje-$(($LAST + 1)).bug |
View nativescript.sh
source ~/scripts/android.sh | |
nvm use node | |
sudo update-alternatives --config java | |
export JAVA_HOME=$(update-alternatives --query javac | sed -n -e 's/Best: *\(.*\)\/bin\/javac/\1/p') | |
export J2REDIR='' | |
export J2SDKDIR='' | |
source ~/scripts/fixjava.sh |
View keyboard.sh
setxkbmap -layout br -variant nativo |
View vpncc.sh
snx -s 000.000.000.000 -u nelson@domain.com |
View java-select-version.sh
sudo update-alternatives --config java |
NewerOlder