Skip to content

Instantly share code, notes, and snippets.

View Eugeny's full-sized avatar

Eugene Eugeny

View GitHub Profile
var oauthPercentEncode = (function(){
var escapeChars = "!*'();:@&=+$,/?%#[]",
matchChars = new RegExp( "([\\" + ( escapeChars.split('').join('\\')) + "])", "gi");
return function( p ) {
return p.replace( matchChars, function( char ) {
return '%' + ( "" + char ).charCodeAt(0).toString(16).toUpperCase();
})
}
@Eugeny
Eugeny / gist:5088669
Last active December 14, 2015 12:48 — forked from NightBrownie/gist:5088663
[BITS 16]
[ORG 0x7c00]
;setting to protected mode
;---------------------------------------------------------------
;save the registers data
pushf
pusha
push ds