sudo vim /etc/postfix/sasl_passwd
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 Dock height | |
| tell application "System Events" to tell process "Dock" | |
| set dock_dimensions to size in list 1 | |
| set dock_height to item 2 of dock_dimensions | |
| end tell | |
| -- get the new width and height for the window | |
| tell application "Finder" | |
| set desktop_dimensions to bounds of window of desktop | |
| set new_width to (item 3 of desktop_dimensions) / 2 | |
| set new_height to (item 4 of desktop_dimensions) - dock_height |
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
| // based on https://gist.github.com/Potfur/5576225 & https://github.com/james2doyle/saltjs | |
| // more info: https://plus.google.com/109231487156400680487/posts/63eZzzrBSb6 | |
| window.$ = function(s) { | |
| var c = { | |
| '#': 'ById', | |
| '.': 'sByClassName', | |
| '@': 'sByName', | |
| '=': 'sByTagName'}[s[0]]; | |
| return document[c?'getElement'+c:'querySelectorAll'](s.slice(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
| #!/bin/bash | |
| # | |
| # Example using getopt (vs builtin getopts) that can also handle long options. | |
| # Another clean example can be found at: | |
| # http://www.bahmanm.com/blogs/command-line-options-how-to-parse-in-bash-using-getopt | |
| # | |
| aflag=n | |
| bflag=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
| /* bling.js */ | |
| window.$ = document.querySelector.bind(document); | |
| window.$$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
| NodeList.prototype.__proto__ = Array.prototype; | |
| NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
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
| /* | |
| * Ensure the http protocol is always used on the myshopify.com domains. | |
| * Uses liquid to input the correct URL. | |
| */ | |
| if (window.location.href.match(/https:\/\/.*.myshopify.com/) && top === self) { | |
| window.location.href = window.location.href.replace(/https:\/\/.*.myshopify.com/, 'http://{{ shop.domain }}'); | |
| } |
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
| // domains to check | |
| var checkDomains = ['www.foobar.com', 'www.fubar.com']; | |
| // check all links in DOM for matching domain(s) | |
| var matchingLinks = []; | |
| var documentLinks = document.links; | |
| for (var i = 0; i < documentLinks.length; i++) { | |
| if (checkDomains.indexOf(documentLinks[i].hostname) > -1) | |
| matchingLinks.push(documentLinks[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
| /**************************************************************** | |
| ARCHIVED - NOT MAINTAINED | |
| If you want to use this script (or one like it), please use the | |
| maintained version here: | |
| https://github.com/jakerella/jqes6/blob/master/jqes6.js | |
| ****************************************************************/ | |
| (function() { | |
| 'use strict'; |
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
| const echoPostRequest = { | |
| url: 'https://<my url>.auth0.com/oauth/token', | |
| method: 'POST', | |
| header: 'Content-Type:application/json', | |
| body: { | |
| mode: 'application/json', | |
| raw: JSON.stringify( | |
| { | |
| client_id:'<your client ID>', | |
| client_secret:'<your client secret>', |
OlderNewer