Skip to content

Instantly share code, notes, and snippets.

View Manishearth's full-sized avatar
🍃
yahaha! you found me!

Manish Goregaokar Manishearth

🍃
yahaha! you found me!
View GitHub Profile
@Manishearth
Manishearth / Add_kbd_shortcut.user.js
Created April 24, 2012 06:08 — forked from BrockA/Add_kbd_shortcut.user.js
This is a userscript that adds shortcuts for adding <kbd> tags to posts. Designed for Stack Exchange sites.
// ==UserScript==
// @name _Add kbd shortcut
// @namespace StackExchange
// @description Adds a button and a keyboard shortcut to add <kbd> tags.
// @match http://*.askubuntu.com/*
// @match http://*.onstartups.com/*
// @match http://*.serverfault.com/*
// @match http://*.stackapps.com/*
// @match http://*.stackexchange.com/*
// @match http://*.stackoverflow.com/*
@Manishearth
Manishearth / Add_kbd_shortcut.user.js
Created May 3, 2012 04:07 — forked from BrockA/Add_kbd_shortcut.user.js
This is a userscript that adds shortcuts for adding <kbd> tags to posts. Designed for Stack Exchange sites.
// ==UserScript==
// @name _Add kbd shortcut
// @namespace StackExchange
// @description Adds a button and a keyboard shortcut (Alt-K) to add <kbd> tags.
// @match http://*.askubuntu.com/*
// @match http://*.onstartups.com/*
// @match http://*.serverfault.com/*
// @match http://*.stackapps.com/*
// @match http://*.stackexchange.com/*
// @match http://*.stackoverflow.com/*
@Manishearth
Manishearth / Math_tags.js
Created May 3, 2012 04:08 — forked from BrockA/Add_kbd_shortcut.user.js
Math buttons for StackExchange sites
// ==UserScript==
// @name Math Buttons
// @namespace StackExchange
// @description Adds math,chem, and SI shortcuts to SE
// @match http://*.askubuntu.com/*
// @match http://*.onstartups.com/*
// @match http://*.serverfault.com/*
// @match http://*.stackapps.com/*
// @match http://*.stackexchange.com/*
// @match http://*.stackoverflow.com/*
// ==UserScript==
// @name Stack Exchange Retag helper
// @namespace Rob W
// @author Rob W
// @description Configurable helper to enable a quicker retagging of questions at Stack Overflow
// @include http://stackoverflow.com/questions/*
// @include http://stackoverflow.com/q/*
// @include http://stackoverflow.com/search?*
// @include http://stackoverflow.com/posts/*/edit*
// @version 2.1
@Manishearth
Manishearth / cacheSelectors.js
Created June 26, 2012 08:16 — forked from Rockncoder/cacheSelectors.js
PhoneGap + JQM Performance Tip #2: Cache jQuery Selectors
var $paperTape = $("#paperTape"),
$li = $("#paperTape li"),
$sum = $("#sum"),
height = parseInt($li.css("height"),10),
top = RocknCoder.Dimensions.top,
getTop = function(){
return top;
};
// ==UserScript==
// @name Stack Exchange Retag helper
// @namespace Rob W
// @author Rob W
// @description Configurable helper to enable a quicker retagging of questions at Stack Overflow
// @include http://physics.stackexchange.com/questions/*
// @include http://physics.stackexchange.com/q/*
// @include http://physics.stackexchange.com/search?*
// @include http://physics.stackexchange.com/posts/*/edit*
// @version 2.1
@Manishearth
Manishearth / gist:2994654
Created June 26, 2012 09:30
Fixed version of http://userscripts.org/scripts/show/121541 for physics.SE retagging
// ==UserScript==
// @name Stack Exchange Retag helper
// @namespace Rob W
// @author Rob W
// @description Configurable helper to enable a quicker retagging of questions at Stack Overflow
// @include http://physics.stackexchange.com/questions/*
// @include http://physics.stackexchange.com/q/*
// @include http://physics.stackexchange.com/search?*
// @include http://physics.stackexchange.com/posts/*/edit*
// @version 2.1
@Manishearth
Manishearth / kalina.py
Created January 31, 2014 16:25
Kalina emulator
#!/usr/bin/python
# kalina.py
# by Manish Goregaokar
# requires https://github.com/Manishearth/ChatExchange
from random import choice
import json,os,sys
from ChatExchange.SEChatWrapper import *
if("ChatExchangeU" in os.environ):
username=os.environ["ChatExchangeU"]
@Manishearth
Manishearth / mainsite.user.js
Last active August 29, 2015 13:56
Main site links on SE Meta topbar
// ==UserScript==
// @name Main site link on meta topbar
// @namespace Manishearth
// @description Brings back the bold reputation counter/post scores!
// @include http://meta.stackoverflow.com/*
// @include http://meta.serverfault.com/*
// @include http://meta.superuser.com/*
// @include http://stackapps.com/*
// @include http://meta.*.stackexchange.com/*
// @include http://meta.askubuntu.com/*
enum SyncOrAsync<'a> {
Sync(&'a mut JSRef<'a, XMLHttpRequest>),
Async(TrustedXHRAddress)
}
...
impl XMLHttpRequest {
...
fn progress_syncorasync(sync: SyncOrAsync, msg: XHRProgress, script_chan: &ScriptChan) {
match sync {