- http://stackoverflow.com/questions/804115 (
rebasevsmerge). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebasevsmerge) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
resetvscheckoutvsrevert) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse) - http://stackoverflow.com/questions/292357 (
pullvsfetch) - http://stackoverflow.com/questions/39651 (
stashvsbranch) - http://stackoverflow.com/questions/8358035 (
resetvscheckoutvsrevert)
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: Get an API key here: https://developers.google.com/url-shortener/v1/getting_started#APIKey | |
| // Step 2: Paste your api key below | |
| // Step 3: Add the code below to your browser as a bookmark | |
| // Step 4: Visit a non-goo.gl URL and click your bookmark | |
| // NOTE: The security policy of some sites (such as this gist.github.com!) will prevent this from working. | |
| // Check your javascript console if something doesn't work. | |
| javascript:(function(){ | |
| var googleApiKey = 'INSERT YOUR API KEY HERE'; |
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
| // Changes XML to JSON | |
| // Modified version from here: http://davidwalsh.name/convert-xml-json | |
| xmlToJson(xml) { | |
| // Create the return object | |
| let obj = {}; | |
| if (xml.nodeType === 1) { // element | |
| // do attributes | |
| if (xml.attributes.length > 0) { | |
| obj['@attributes'] = {}; |
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
| # Turn on Notifications | |
| do shell script "defaults -currentHost write com.apple.notificationcenterui doNotDisturb -bool FALSE; defaults -currentHost delete com.apple.notificationcenterui doNotDisturbDate; osascript -e 'quit application \"NotificationCenter\" ' && killall usernoted" -- this set 'Do not disturb' to false in the pref | |
| # Show Desktop | |
| do shell script "defaults write com.apple.finder CreateDesktop -bool true; killall Finder" | |
| # Show all windows | |
| tell application "System Events" | |
| set visible of (every process) to true | |
| end tell |
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
| -- | |
| -- draws a sprite to the screen with an outline of the specified colour | |
| -- | |
| function outline_sprite(n,col_outline,x,y,w,h,flip_x,flip_y) | |
| -- reset palette to black | |
| for c=1,15 do | |
| pal(c,col_outline) | |
| end | |
| -- draw outline | |
| for xx=-1,1 do |
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
| /* == Montserrat Font Family Styles == */ | |
| /* @group Montserrat | |
| -------------------------------------------------------------- */ | |
| /* = Weights Montserrat | |
| -------------------------------------------------------------- */ | |
| .thin { |
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
| [[[15,15,25,177,22,151,31,135,42,136,58,89,126,80,190,91,206,119,211,135,224,136,234,150,231,173,216,196,208,198,198,219,155,245,127,252,102,245,83,235,61,221,47,200,35,193],[4,4,73,97,95,88,108,99,112,113,95,102,82,104,71,115],[4,4,149,99,159,88,180,96,184,114,172,102,158,103,145,116],[15,14,24,150,33,137,45,138,48,200,36,189,26,174],[4,4,47,175,43,164,42,134,45,108,57,111,54,157],[15,14,231,170,215,193,208,198,209,173,214,137,223,139,231,150],[4,4,208,173,199,154,201,108,215,129,212,167],[8,8,33,128,28,104,41,69,63,39,92,12,127,7,149,8,182,24,202,47,224,88,228,118,217,136,207,117,177,94,126,85,66,99,44,121,42,134],[8,14,165,70,207,90,214,105,209,121,210,106,202,93,164,75,106,72,65,84,46,101,45,118,41,101,61,80,106,67],[7,7,102,28,129,19,152,27,164,45,153,68,102,67,92,48],[8,8,100,55,116,26,128,35,140,25,157,54,148,61,138,38,127,49,117,38,109,61],[7,7,82,123,93,116,107,122,114,137,113,147,100,153,94,165,84,161,80,152,78,140],[7,7,144,129,151,119,162,117,172,124,176,134,175,150,172,161,162,166,159,157,150,149 |
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
| pico-8 cartridge // http://www.pico-8.com | |
| version 8 | |
| __lua__ | |
| -- raycaster demo | |
| -- by @powersaurus | |
| -- based heavily on http://lodev.org/cgtutor/raycasting.html | |
| -- and http://lodev.org/cgtutor/raycasting2.html | |
| -- and inspired by the work of @matthughson | |
| -- thanks for advice from @kometbomb and @doyousketch2 and @krajzeg | |
| -- |
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
| # One liner | |
| wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
| # Explained | |
| wget \ | |
| --recursive \ # Download the whole site. | |
| --page-requisites \ # Get all assets/elements (CSS/JS/images). | |
| --adjust-extension \ # Save files with .html on the end. | |
| --span-hosts \ # Include necessary assets from offsite as well. | |
| --convert-links \ # Update links to still work in the static 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
| [ | |
| { | |
| "name": "Google", | |
| "url": "http:\/\/www.google.com" | |
| }, | |
| { | |
| "name": "Bing", | |
| "url": "http:\/\/www.bing.com" | |
| }, | |
| { |