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 | |
| date=`date "+%Y-%m-%dT%H_%M_%S"` | |
| HOME=/Users/path | |
| rsync -azP \ | |
| --delete \ | |
| --delete-excluded \ | |
| --exclude-from=$HOME/.Trash \ | |
| --exclude-from=$HOME/.cache \ |
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
| /** | |
| * jQuery.preload | |
| * | |
| * Preload images using the promise pattern. | |
| * | |
| * Usage: | |
| * | |
| * $.preload(img_uri, img_uri, ...).done(function(img, img, ...) { | |
| * // Do stuff with the arguments | |
| * }); |
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/bash | |
| # limpa a pasta antiga | |
| rm -rf ~/Sites/apache-tomcat-6.0.37/work/Catalina/localhost/ | |
| FOLDER=$(pwd) | |
| LocalHostFolder="~/Sites/apache-tomcat-6.0.37/conf/Catalina/localhost/" | |
| ROOTFile=$LocalHostFolder"ROOT.xml" | |
| XMLTemplate="<Context docBase=\"$FOLDER/web\" path=\"\"> | |
| </Context>" |
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
| window.ParsleyConfig = { | |
| validators: { | |
| cpf: { | |
| fn : function ( val, req) { | |
| val = $.trim(val); | |
| val = val.replace('.',''); | |
| val = val.replace('.',''); | |
| cpf = val.replace('-',''); | |
| while(cpf.length < 11) cpf = "0"+ cpf; |
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
| <script src="//www.youtube.com/player_api"></script> | |
| <script type="text/javascript"> | |
| // attach our YT listener once the API is loaded | |
| // | |
| var $ = jQuery; | |
| // listen for play/pause, other states such as rewind and end could also be added | |
| // also report % played every second | |
| function onPlayerStateChange(e) { | |
| // e["data"] == YT.PlayerState.PLAYING && ; |
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
| function checkCPF( val ) { | |
| val = $.trim(val); | |
| val = val.replace('.',''); | |
| val = val.replace('.',''); | |
| cpf = val.replace('-',''); | |
| while(cpf.length < 11) cpf = "0"+ cpf; | |
| var expReg = /^0+$|^1+$|^2+$|^3+$|^4+$|^5+$|^6+$|^7+$|^8+$|^9+$/; | |
| var a = []; | |
| var b = new Number; |
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
Show hidden characters
| {"keys": ["super+shift+h"], "command": "encode_html_entities"} |
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
| @mixin placeholder() { | |
| &::-webkit-input-placeholder { | |
| @content; | |
| } | |
| &:-moz-placeholder { | |
| @content; | |
| } | |
| &::-moz-placeholder { |
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
| var thePlayer = new YT.Player('yt-embed', { | |
| height: '360', | |
| width: '540', | |
| videoId: 'bScJ8bbwMNM', | |
| events: { | |
| 'onStateChange': function(e){ | |
| switch (e.data) { | |
| case YT.PlayerState.ENDED: | |
| clearWatcherVideo(); | |
| break; |
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
| angular.module('myApp') | |
| .directive('chosen',function(){ | |
| 'use strict'; | |
| var linker = function(scope, element, attrs) { | |
| var config = scope.$eval(attrs['chosen']), | |
| list = attrs['chosenCollection']; | |
| _.extend(config, {inherit_select_classes: true}); |