Skip to content

Instantly share code, notes, and snippets.

Avatar
🎮
GameDev by night

Ajinkya Borade steelx

🎮
GameDev by night
View GitHub Profile
View github_oauth_busy_developer_guide.md

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 Develop.GitHub.com.

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
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
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
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
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
pause
@pmeissner
pmeissner / layout.jade
Created Aug 15, 2013
Wireframe layout template file.
View layout.jade
- var site_url = 'https://s3.amazonaws.com/creative_loupe/website/demos/wireframing'
- var site_name = 'Wireframing Inc'
- var layout = ''
- var section = ''
- var sidebar_content = ''
block vars
doctype
//if IE 8
@cowboy
cowboy / #bf4-emblem-import-export.md
Last active Jun 29, 2021
JavaScript: BF4 Battlelog Emblem Import / Export
View #bf4-emblem-import-export.md

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:
    copy('emblem.emblem.load('+JSON.stringify(emblem.emblem.data,null,2)+');');
  6. Paste somewhere useful, like a gist. Whatever.
  7. Close the console (Ctrl-Shift-J).
@nnarhinen
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
require('time-grunt')(grunt);
// load all grunt tasks
require('load-grunt-tasks')(grunt);
//MODIFIED: add require for connect-modewrite
var modRewrite = require('connect-modrewrite');
grunt.initConfig({
View alert.js
alert('hello ' + document.location.href);
@afternoon
afternoon / rename_js_files.sh
Created Feb 15, 2014
Rename .js files to .ts
View rename_js_files.sh
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;