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(){if(!/*@cc_on!@*/0)return;var e = "abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video".split(','),i=e.length;while(i--){document.createElement(e[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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
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 links = document.getElementsByTagName("a"); | |
for (var i=0; i < links.length; i++) { | |
var link = links[i]; | |
link.addEventListener("click", function(e) { | |
e.preventDefault(); | |
}); | |
link.addEventListener("touchend", function() { | |
document.location = this.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
// <a rel="smoothscroll" href="#foo">got to foo</a> | |
// <div id="foo">Foo content</div> | |
$(function () { | |
$('a[rel=smoothscroll]').click(function( event ) { | |
var location = window.location, | |
hash = $(this).attr('href') | |
; | |
$('html, body') | |
.stop() | |
.animate({scrollTop: $(hash).offset().top}, 800, function () { |
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
// Step 1. | |
// this returns some useful information which will help you fill out the next command. | |
// look for the line that begins with "remote.origin.url". | |
$ git config -l | |
// Step 2. | |
// use the information from step one to replace 'your_username' and 'your_project'. | |
$ git config remote.origin.url [email protected]:your_username/your_project.git |
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
on alfred_script(q) | |
tell application "System Events" | |
set MyList to (name of every process) | |
end tell | |
if (MyList contains "Spotify") is true then | |
if (q equals "p") then | |
tell application "Spotify" to play | |
else if (q equals "pp") then | |
tell application "Spotify" to pause | |
else if (q equals "t") then |
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 into my projects directory | |
cd ~/dropbox/freelance/projects/ | |
# Create a new folder using the query | |
mkdir {query} | |
# Clone the boilerplate into this new directory | |
git clone https://github.com/benjamincharity/mm-boilerplate.git {query} | |
# Cd into the project |
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
$ ps -ax | grep Photoshop | |
## change 12345 to the PID number returned with the first command. | |
$ kill -CONT 12345 |
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
/** | |
* CSS Border with Box-Shadow Example | |
*/ | |
div { | |
/* Borders */ | |
box-shadow: 0 0 0 6px rgba(0,0,0,0.2), 0 0 0 12px rgba(0,0,0,0.2), 0 0 0 18px rgba(0,0,0,0.2), 0 0 0 24px rgba(0,0,0,0.2); | |
/* Meaningless pretty things */ | |
background: linear-gradient(45deg, powderBlue, ghostwhite); |
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
:%s/\s\+$// |