Skip to content

Instantly share code, notes, and snippets.

View oliversalzburg's full-sized avatar
💭
>:(

Oliver Salzburg oliversalzburg

💭
>:(
View GitHub Profile
@shesek
shesek / inject.coffee
Created February 11, 2012 04:10
Executing code in the webpage context from Chrome extensions.
inject = (args..., fn) ->
script = document.createElement 'script'
script.innerHTML = """
Array.prototype.pop.call(document.getElementsByTagName('script')).innerText = JSON.stringify(function() {
try { return #{ fn.toString() }.apply(window, #{ JSON.stringify args }); }
catch(e) { return {isException: true, exception: e.toString()}; }
}());
"""
document.body.appendChild script
response = JSON.parse script.innerText
@neonichu
neonichu / gplus-post.rb
Created January 30, 2012 01:24
Automatically post to your Google+ account from the commandline.
#!/usr/bin/env ruby
##### Automatically post to your Google+ account from the commandline.
##### (C) 2012 Boris Buegling <boris@icculus.org>
require 'rubygems'
require 'mechanize'
## Use Windows Mobile user agent to get Basic Mobile HTML
agent = Mechanize.new
@matthewmccullough
matthewmccullough / git-deletealltags.bsh
Created April 1, 2011 20:29
Script to delete all tags both locally and remotely
for t in `git tag`
do
git push origin :$t
git tag -d $t
done
@Benjol
Benjol / autoreviewcomments.user.js
Last active February 4, 2022 18:34
Add pro-forma comments dialog for reviewing (pre-flag)
// ==UserScript==
// @name AutoReviewComments
// @namespace benjol
// @version 1.3.1
// @description Add pro-forma comments dialog for reviewing (pre-flag)
// @grant none
// @include http*://*stackoverflow.com/questions*
// @include http*://*stackoverflow.com/review*
// @include http*://*stackoverflow.com/admin/dashboard*
// @include http*://*stackoverflow.com/tools*