Skip to content

Instantly share code, notes, and snippets.

GameDev by night

Ajinkya Borade steelx

GameDev by night
View GitHub Profile

GitHub OAuth Busy Developer's Guide

This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at

OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.

Web Application Flow

  • Redirect to this link to request GitHub access:
danielestevez / gist:2044589
Last active Sep 19, 2022
GIT Commit to an existing Tag
View gist:2044589
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}
gordonbrander / ID.js
Last active Sep 19, 2022
ID - a unique ID/name generator for JavaScript
View ID.js
// Do not use. Use Symbol() instead.
keeguon / countries.json
Created Apr 5, 2012
A list of countries in JSON
View countries.json
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
Mithrandir0x / disable_wifi_hotspot.bat
Last active Aug 20, 2018
Two little batch files to create a cozy WiFi hotspot from the laptop Snatched from xda-developers, yet I don't remember the thread. Kudos to the author.
View disable_wifi_hotspot.bat
netsh wlan stop hostednetwork
pmeissner / layout.jade
Created Aug 15, 2013
Wireframe layout template file.
View layout.jade
- var site_url = ''
- var site_name = 'Wireframing Inc'
- var layout = ''
- var section = ''
- var sidebar_content = ''
block vars
//if IE 8
cowboy /
Last active Jun 29, 2021
JavaScript: BF4 Battlelog Emblem Import / Export

Exporting an emblem

  1. Log into BF4 Battlelog.
  2. Visit the Customize emblem page.
  3. Select the emblem you wish to export.
  4. Open the console (Ctrl-Shift-J).
  5. Enter the following code snippet to copy the raw emblem data to the clipboard:
  6. Paste somewhere useful, like a gist. Whatever.
  7. Close the console (Ctrl-Shift-J).
nnarhinen / Gruntfile.js
Last active Feb 11, 2020
Support html5 pushState (or angular.js html5mode) in a yeoman (grunt-contrib-connect) application.
View Gruntfile.js
module.exports = function (grunt) {
// show elapsed time at the end
// load all grunt tasks
//MODIFIED: add require for connect-modewrite
var modRewrite = require('connect-modrewrite');
View alert.js
alert('hello ' + document.location.href);
afternoon /
Created Feb 15, 2014
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;