Skip to content

Instantly share code, notes, and snippets.

View joahg's full-sized avatar
🦛

Joah Gerstenberg joahg

🦛
View GitHub Profile

Keybase proof

I hereby claim:

  • I am JoahG on github.
  • I am joahg (https://keybase.io/joahg) on keybase.
  • I have a public key whose fingerprint is 3A5C 0488 D2E6 93A6 7A9D 3170 FEF4 A4EA 0E82 8AF1

To claim this, I am signing this object:

$(function() {
var groupImages = {},
api_token = '';
for (i in groupIds) {
groupImages[groupIds[i].id] = { variants: {} };
$('[data-id="' + groupIds[i].id.toString() + '"] select[name*="ProductGroupVariants"] option').each(function() {
groupImages[groupIds[i].id][$(this).attr('value')] = '';
});
}
/*
* calc-grid.css v1.1 by Joah Gerstenberg
* a 2.8kb bootstrap-esque grid built purely from calc() calls
* support: http://caniuse.com/#feat=calc
*/
.container {
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
@joahg
joahg / issues.md
Last active August 29, 2015 14:11
live updates the price on AC product pages according to quantity.

Known issues:

  • none at the moment
@joahg
joahg / domSniper.js
Last active March 4, 2020 13:50
domSniper is a simple JavaScript bookmarklet to easily remove a DOM node from a document using JavaScript
(function(){
var body = document.body;
var snipe = function(e) {
body.style.cursor = 'initial';
e.preventDefault();
e.target.parentNode.removeChild(e.target);
body.removeEventListener('click', snipe, false);
};
body.addEventListener('click', snipe, false);
body.style.cursor = 'crosshair';
@joahg
joahg / stalkUser.py
Created January 8, 2014 02:59
Small program I made to follow (or unfollow) all the users that another user is following. Requires that you create a new Personal Access Token for authorization at https://github.com/settings/tokens/new
import requests
uf = False # Unfollow all (currently followed) users?
f = True # Follow all (currently unfollowed) users?
def url(path, page=1, auth=""):
return "https://api.github.com" + path + "?page=" + str(page) + "&access_token=" + auth
def unfollow(user):
requests.delete(url("/user/following/" + user["login"], 1, auth))
This file has been truncated, but you can view the full file.
define("models/composer/file", ["require", "exports", "module", "backbone"], function (e, t, n) {
var r = e("backbone");
n.exports = r.Model.extend({})
}), define("collections/composer/files", ["require", "exports", "module", "collections/api/base", "models/composer/file"], function (e, t, n) {
var r = e("collections/api/base"),
i = e("models/composer/file");
n.exports = r.extend({
model: i,
namesepace: "files"
})
import json
import requests
d = json.loads(requests.get("https://api.github.com/repos/andrew/24pullrequests/contributors?access_token=REDACTED").text)
with open('output.txt', 'wb') as f:
for i in d:
e = json.loads(requests.get(i["url"]+"?access_token=REDACTED").text)
try:
print e["name"]
require 'spec_helper'
describe 'Gifts' do
subject { page }
let(:user) { create :user, nickname: "akira" }
describe '#new'
before do
let!(:pull_request) { create :pull_request, user: user }
let!(:gift) { create(:gift, user: user, pull_request: pull_request)
@joahg
joahg / create.js
Created November 26, 2013 17:28
Library of AJAX requests that make beta testing Codecademy Projects easier.
(function () {
$.ajax({
url: "http://www.codecademy.com/projects/",
dataType: "json",
type: "POST",
data: {
authentication_token: CCDATA.current_user.authentication_token,
codebit: {
name: prompt("Name your Codebit."),
files: [