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
| /** | |
| * Get YouTube ID from various YouTube URL | |
| * @author: takien | |
| * @url: http://takien.com | |
| * For PHP YouTube parser, go here http://takien.com/864 | |
| */ | |
| function YouTubeGetID(url){ | |
| var ID = ''; | |
| url = url.replace(/(>|<)/gi,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/); |
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 | |
| echo "\n\n--- Killing Stupid Adobe Auto Load Crap ---\n\n" | |
| launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist | |
| launchctl unload -w /Library/LaunchAgents/com.adobe.AAM.Updater-1.0.plist | |
| echo "\n\n--- Done! ---\n\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
| { | |
| "estados": [ | |
| { | |
| "sigla": "AC", | |
| "nome": "Acre", | |
| "cidades": [ | |
| "Acrelândia", | |
| "Assis Brasil", | |
| "Brasiléia", | |
| "Bujari", |
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
| $(document).keydown(function(e) { | |
| var code = (e.keyCode ? e.keyCode : e.which); | |
| switch(code) { | |
| case 37: // left | |
| //e.preventDefault(); | |
| break; | |
| case 38: // top | |
| 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
| /* | |
| .background { | |
| position: fixed; | |
| width: 100%; | |
| height: 100%; | |
| z-index: -1; | |
| } | |
| <div class="background"> | |
| <img class="img" src="bg.jpg" alt=""> |
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 isLocal(){ | |
| return window.location.href.indexOf('.dev') > -1; | |
| } | |
| // not local (prod) | |
| if ( !isLocal() ) { | |
| } |
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 detectIE(){ | |
| var ua = window.navigator.userAgent; | |
| var msie = /MSIE/.test( ua ); | |
| var trident = /Trident/.test( ua ); | |
| if( msie > 0 ){ | |
| // IE 10 or older => return version number | |
| var msiePosition = ua.indexOf('MSIE ')+5; | |
| return parseInt( ua.replace(/.*MSIE ([0-9]+).*/,'$1') ); // Return only the version | |
| } |
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
| causeRepaintsOn = $('element'); | |
| $(window).resize(function() { | |
| causeRepaintsOn.css('z-index', 1); | |
| }); |
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 isMobile = { | |
| Android: function() { | |
| return navigator.userAgent.match(/Android/i); | |
| }, | |
| BlackBerry: function() { | |
| return navigator.userAgent.match(/BlackBerry/i); | |
| }, | |
| iOS: function() { | |
| return navigator.userAgent.match(/iPhone|iPad|iPod/i); | |
| }, |
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
| // only run this when NOT locally (i.e.: http://project.dev) | |
| if ( window.location.href.indexOf('.dev') 1== false ) { | |
| // do something | |
| } |