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
| # --------------------------------------------------- | |
| # Correct workflow when working with forked upstreams. | |
| # --------------------------------------------------- | |
| git fetch origin --prune | |
| # If you haven't made any local changes: | |
| git checkout branch-name | |
| git merge --ff-only origin/branch-name | |
| # If you have local changes, you'll get this error: fatal: Not possible to fast-forward, aborting. |
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
| # Using redirection, run a command only if the previous command's exit code is 0, | |
| command &>/dev/null && conditionalcommand | |
| # example: | |
| tmux has-session -t mysession &>/dev/null && echo "mysession exists!" |
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
| /*! | |
| * Referral spam blocker | |
| * | |
| * @author Cooper Maruyama | |
| * @site https://convertify.io | |
| */ | |
| window.trackVisitor = function() { | |
| /* Put any tracking scripts here */ | |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
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
| // copy/paste into chrome console (alt+cmd+J) after the video starts playing. | |
| setInterval(function() { | |
| var possibleButtons = document.getElementsByClassName('continue-playing'); | |
| if (possibleButtons.length) { | |
| for (var i = 0; i < possibleButtons.length; i++) { | |
| if (/Continue Playing/.test(possibleButtons[i].textContent)) { | |
| var event = document.createEvent('HTMLEvents'); | |
| event.initEvent('click', true, false); | |
| possibleButtons[i].dispatchEvent(event); | |
| } |
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
| .tree-view { | |
| overflow-y: auto; | |
| padding-right: 0; | |
| .selected { | |
| &::before { | |
| background: none !important; | |
| } | |
| & > * { | |
| text-shadow: -8px 0px 27px hsla(48, 48%, 94%, 0.6), | |
| 10px 0px 27px hsl(48, 75%, 94%), |
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
| '.source.coffee': | |
| 'ViewModel - Collection': | |
| 'prefix': 'vmc' | |
| 'body': """ | |
| Template.${1:Items}.viewmodel "$1", ${2:${3:viewmodelToExtend},} { | |
| $1: -> $1.find() | |
| ${4:active$1: null | |
| }$5 | |
| }, "$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/sh | |
| # To use: | |
| # 1. save this file as /usr/bin-git-jekyll-deploy then `sudo chmod 775 /usr/bin/git-jekyll-deploy` | |
| # 2. create a "source" branch where you'll maintain your jekyll site: git branch -b source | |
| # 3. run `jekyll build` | |
| # 4. run `git add . && git commit -am "update content"` | |
| git branch -D master | |
| git checkout -b master | |
| git checkout source |
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.getScript("//dl.dropboxusercontent.com/s/ci08683w66ud4s0/optimizelyspytool.js"); |
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
| pocket = []; //initialize an array to store urls to check | |
| $("li.item").each(function(index,value){ | |
| $(this).find("a").each(function() { | |
| if (/[0-9]+.html/.test($(this).attr("href"))) { | |
| pocket.indexOf($(this).attr("href")) > -1 ? console.log("found duplicate:"+$(this).attr("href")) : pocket.push($(this).attr("href")); | |
| } | |
| }); | |
| }); |
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
| $('.element').hover( | |
| -> | |
| unless $(this).children('span.overlay').length | |
| $(this).append('<span class="overlay"></span>') | |
| $('span.overlay',this).fadeIn(350) | |
| ,-> | |
| $('span.overlay',this).fadeOut(350) | |
| window.setTimeout -> | |
| $(this).children('span.overlay').remove() | |
| 350 |