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
| isMobile = () -> | |
| if navigator.userAgent.match(/Android/i) || | |
| navigator.userAgent.match(/webOS/i) || | |
| navigator.userAgent.match(/iPhone/i) || | |
| navigator.userAgent.match(/iPad/i) || | |
| navigator.userAgent.match(/BlackBerry/i) || | |
| navigator.userAgent.match(/Windows Phone/i) | |
| true | |
| else | |
| false |
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
| // Line #624, I needed to "reset the audioPlayers array | |
| function profileAudioPlayers(){ | |
| audioPlayers = [] | |
| $('.provider-audio').each ... | |
| } | |
| // Line #236 | |
| Changed from: | |
| $('.provider-audio__play').on('click touchstart', function(){ | |
| To: |
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
| // http://www.gotknowhow.com/articles/how-to-asynchronously-load-font-awesome-css-file | |
| <script> | |
| // Asynchronously load non-critical css | |
| function loadCSS(e, t, n) { "use strict"; var i = window.document.createElement("link"); var o = t || window.document.getElementsByTagName("script")[0]; i.rel = "stylesheet"; i.href = e; i.media = "only x"; o.parentNode.insertBefore(i, o); setTimeout(function () { i.media = n || "all" }) } | |
| // load css file async | |
| loadCSS("//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css"); | |
| </script> | |
| // load css file async | |
| loadCSS("/css/my-test.css"); |
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
| audioElement = document.createElement('audio'); | |
| audioElement.setAttribute('src', MP3_URL_GOES_HERE); | |
| audioElement.load(); | |
| console.log('Loading audioElement'); | |
| audioElement.addEventListener('canplaythrough', function(){ | |
| console.log('audioElement Loaded'); | |
| console.log('Duration in seconds: ' + this.duration); | |
| }) |
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
| Best use for iCloud ever :) | |
| Voice memo example: | |
| The simplest way I found that worked around iPhone's voice memo app limitation was as follows: | |
| - In voice memo, select your audio file and share 'via email', not SMS. | |
| - Once email app opens, you will find the selected audio file as an attachment | |
| - Now cancel the email - and you will be given an option to save email in draft form. | |
| - Save in draft form |
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
| echo "message_size_limit = 20480000" > /etc/postfix/main.cf | |
| service postfix reload |
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
| cd /tmp && curl https://www.openssl.org/source/openssl-1.0.1i.tar.gz | tar xz && cd openssl-1.0.1i && sudo ./config && sudo make && sudo make install |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE policymap [ | |
| <!ELEMENT policymap (policy)+> | |
| <!ELEMENT policy (#PCDATA)> | |
| <!ATTLIST policy domain (delegate|coder|filter|path|resource) #IMPLIED> | |
| <!ATTLIST policy name CDATA #IMPLIED> | |
| <!ATTLIST policy rights CDATA #IMPLIED> | |
| <!ATTLIST policy pattern CDATA #IMPLIED> | |
| <!ATTLIST policy value CDATA #IMPLIED> | |
| ]> |
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
| ruby -e 'def a;10.times{puts " "*rand(79)+"*"};end;99.times{a;puts " "*34+"!! Happy Friday Batch 8 !!";a;sleep 0.1;puts "\e[2J"}' |
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
| #target photoshop | |
| function main(){ | |
| if(!documents.length) return; | |
| var doc = activeDocument; | |
| var oldPath = activeDocument.path; | |
| for(var a=0;a<doc.layerSets.length;a++){ | |
| activeDocument.activeLayer = activeDocument.layers.getByName(doc.layerSets[a].name); | |
| dupLayers(); | |
| var saveFile= File(oldPath +"/"+doc.layerSets[a].name +".png"); | |
| SavePNG(saveFile); |
NewerOlder