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
</* | |
<form name="formTest" novalidate> | |
<input id="rut" name="rut" type="text" | |
ng-model="rut" placeholder="Ej. 11.222.333-4" autocomplete="off" ng-pattern="regexRut" | |
ng-change="validateRut(formTest.rut)" onkeypress="return (event.charCode >= 48 && event.charCode <= 57) || event.charCode == 45 || event.charCode == 75 || event.charCode == 107;"> | |
</form> | |
*/ | |
//in Controller | |
vm.regexRut ="^([0-9]+-[0-9Kk])$"; |
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
#add the following code to your bash_profile | |
#open new terminal to test it | |
base64d(){ | |
printf "`echo $1 | base64 --decode` Copied to clipboard!\n" | |
echo $1 | base64 --decode | pbcopy | |
} | |
base64e(){ |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
mySep(){ | |
printf \\r | |
COLU=`tput cols` | |
for ((a=1; a <= $COLU ; a++)) | |
do | |
printf "-" | |
done | |
printf \\n | |
} |
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
backupOnDropbox(){ | |
STRNOW=`date +"%Y%m%d%H%M"`; | |
STRNAMEDIR=`basename $PWD`_; | |
STRDESCFILE='_backup.zip'; | |
zip -r $STRNAMEDIR$STRNOW$STRDESCFILE * | |
mv $STRNAMEDIR$STRNOW$STRDESCFILE ~/Dropbox/ | |
} |