Skip to content

Instantly share code, notes, and snippets.

password
@jkap
jkap / giveaway.rb
Last active November 8, 2018 02:15
A quick script I wrote to help pick a winner for a friend's tumblr giveaway
require 'tumblr_client'
Tumblr.configure do |config|
config.consumer_key = "conumer_key"
config.consumer_secret = "consumer_secret"
config.oauth_token = "oauth_token"
config.oauth_token_secret = "oauth_token_secret"
end
client = Tumblr::Client.new
posts = client.posts("blog", id: id, notes_info: true)
notes = posts["posts"].first["notes"]
@jkap
jkap / Res.sh
Last active December 20, 2015 08:39 — forked from Garland-g/Res.sh
#!/bin/bash
#Original author: Travis Gibson
#Modified for the Chromebook Pixel by Josh Kaplan
#This script requires an argument for the resolution width
if [ -z "$1" ]; then
echo "Usage: Res.sh <resolution_width>";
exit 1;
fi
erg=$( echo "$1")
check=$(xrandr -q | grep eDP1 | cut -d " " -f 3 | cut -d "x" -f 1)
@jkap
jkap / ngBlink.js
Created March 4, 2014 15:29
Blink for Angular
@jkap
jkap / pronouns.twee
Last active August 29, 2015 14:28
Pronoun Macro for Twine 1
:: Start
Your story will display this passage first. Edit it by double clicking it.
WHAT DO YOU WANT TO BE CALLED
[[PLEASE CALL ME 'SHE'|NextPage][$pnoun_choice = "she"]]
[[MALE PRONOUNS FOR DAYS WHAT WHAT|NextPage][$pnoun_choice = "he"]]
[[CALM THE FUCK DOWN ALL CAPS BOI YOU WILL REFER TO ME WITH THE MODERN 'THEY', WHICH WILL DRIVE PEDANTS MAD WHICH HONESTLY IS WORKING AS INTENDED|NextPage][$pnoun_choice = "they"]]
@jkap
jkap / full-width drafts.js
Created June 6, 2016 17:11
put this in a drafts action to replace yr draft with its full-width equivalent
function fullWidth(input) {
var
dict = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}",
offset = 65281,
out = "",
n,
letter,
codePoints = [],
index;
var HANDCLAP = "👏";
function addClaps(input) {
return input.split('').map(function(char) {
if (char === ' ') {
return ' ' + HANDCLAP + ' ';
}
return char;
}).join('');

Keybase proof

I hereby claim:

  • I am jkap on github.
  • I am jkap (https://keybase.io/jkap) on keybase.
  • I have a public key ASBufboPbT2iX6kOsLi9lsDpYLl-b9pkB7iia3ZbW5lRGgo

To claim this, I am signing this object:

@jkap
jkap / coaster-tiers.md
Last active November 23, 2017 18:06
jkap's coaster tier list

jae kap’s official coaster ranking

coaster count profile

key

  • BGT: Busch Gardens Tampa
  • BGW: Busch Gardens Williamsburg
  • CGA: California’s Great America
  • DAK: Disney’s Animal Kingdom
  • DCA: Disney’s California Adventure
@jkap
jkap / ipod-submarine.md
Last active July 14, 2021 18:36
Elon Musk's iPod Submarine

Elon Musk's iPod Submarine

A game of terrible solutions to terrifying problems by Steve Dee

Transcribed from http://tinstargames.weebly.com/micro-games.html by jae kaplan since i was having trouble reading the image.

Get a piece of paper for every player. One player secretly writes down a terrible problem the world is facing right now, ripped from the headline news or their own tragic life. They must sum it up in six words or less. (eg kids stuck in cave under ocean, Russian interference in world politics, cat vomit on carpet, going to die a virgin). Write this problem on all the pieces of paper except one. On that one, write ELON MUSK.

Put all the pieces of paper in a hat and each player draws one out randomly. The player who wrote the problem does not draw.

Then every player pitches their solution to the problem. Of course, being no-nonsense billionaire tech-bro geniuses, they can only say two words to sum up their solution