Skip to content

Instantly share code, notes, and snippets.

View JKirchartz's full-sized avatar
🤖

Joel Kirchartz JKirchartz

🤖
View GitHub Profile
@JKirchartz
JKirchartz / kwotes.py
Created April 14, 2013 15:44
Scrape all Quotes on a Kwotes site. Kwotes is an open-source quote database with ranking et cetera found here: http://sourceforge.net/projects/kwotes/
from pyquery import PyQuery
def grabber(i=0):
base_url = "http://principiadiscordia.com/memebombs/"
url = base_url + "kwotes.pl?action=list&m=501&so=reverse&o=date&s=" + str(i)
PQ = PyQuery(url)
BQ = PQ("blockquote")
for x in BQ:
try:
print x.text
@JKirchartz
JKirchartz / whitelist-hashtagger
Last active December 17, 2015 04:28
Transform words in a phrase to hashtags using a whitelist, without changing the upper/lower case characters in the words in the phrase (i.e. if your phrase has "Beer" but your whitelist has "beer", you'll see "#Beer")
import re
whitelist = ['quick','lazy','boring']
tweet = "The quick brown fox jumped over the lazy dog. The Quick Brown Fox Jumped Over The Boring Dog"
for item in whitelist:
tweet = re.compile('('+item+')',re.I).sub(r'#\1', tweet, 1)
# remove the `1` if you want it to match all instances
print tweet
@JKirchartz
JKirchartz / report1
Last active December 18, 2015 02:59
apple's error reporting in relation to adium issue: <https://trac.adium.im/ticket/16365> ... "Crash and corruption of the keychain if you want to definitively accept a self-signed certificate for a Jabber/XMPP account." ...
Process: Adium [14470]
Path: /Applications/Adium.app/Contents/MacOS/Adium
Identifier: com.adiumX.adiumX
Version: 1.5.6 (1.5.6)
Code Type: X86-64 (Native)
Parent Process: launchd [268]
Date/Time: 2013-06-05 08:46:39.500 -0400
OS Version: Mac OS X 10.7.5 (11G63b)
Report Version: 9
@JKirchartz
JKirchartz / README.md
Last active December 18, 2015 06:59
Scripts to create a new post & publish it using jekyll. `new_post` takes a title, and optional content; `publish` stages it for publishing on the current date.

Scripts to create a new post & publish it using jekyll. new_post takes a title, and optional content; publish stages it for publishing on the current date.

new_post "Article Title" "Optional content" will create a file named unpublished-article_title.md whose content is

---
layout: post
title: Article Title
published: false

tags: article

@JKirchartz
JKirchartz / GetFiddles.py
Last active December 19, 2015 21:38
Download JSFiddles, so you can keep 'em forever and ever and ever.
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys, os, httplib, codecs
import simplejson as json
def get(url,filename):
try:
conn = httplib.HTTPConnection('jsfiddle.net')
conn.request('GET',url)
@JKirchartz
JKirchartz / BBS.LIST
Last active April 15, 2025 16:19
Notes/Info I've found playing telehack.com (currently only 43 of these BBSes are potential duplicates)
Nostradamus BBS ......................... (801) 487-9715
The Pine Tree BBS ....................... (803) 641-1805
The End Of Time ......................... (803) 855-0783
A.H.I. Helpline ......................... (805) 395-0371
Dark Knights Lair ....................... (805) 563-2160
The *Orion* System ...................... (806) 293-9988
Dragon's Lair BBS ....................... (808) 423-2163
The Tradin' Post ........................ (813) 578-0347
NCahoots! BBS ........................... (816) 452-3219
Beer World .............................. (817) 267-9945
@JKirchartz
JKirchartz / glitcher.py
Created August 3, 2014 05:41
Get images from CLI (or randomly from Instagram pics shared under creative commons liscensing) & glitch 'em
from PIL import Image, ImageStat, ImageEnhance
from random import *
import numpy as np
from itertools import *
import requests
import simplejson
from cStringIO import StringIO
from images2gif import writeGif
import os, sys
@JKirchartz
JKirchartz / ChromaticScales
Created September 17, 2014 19:06
Chromatic Scales & sound synthesis in Actionscript
[SWF(width=200,height=50,backgroundColor=0x666666,frameRate=24)]
var sound:Sound = new Sound();
/* ################ Set the Starting Frequency */
var freq:Number=1046.5;
/* ################ Set the Sample Rate */
var rate:Number=44100;
var phase:Number=0;
var chan:SoundChannel = new SoundChannel();
var trans:SoundTransform = new SoundTransform(0,0);
chan.soundTransform = trans;
@JKirchartz
JKirchartz / gist:c8c37b62f2e2bd0cf488
Created January 6, 2015 22:05
Mapping of currencies to their common symbol
var currencies = {
'USD': '$', 'CAD': 'CA$', 'EUR': '€', 'AED': 'AED', 'AFN': 'Af',
'ALL': 'ALL', 'AMD': 'AMD', 'ARS': 'AR$', 'AUD': 'AU$', 'AZN': 'man.',
'BAM': 'KM', 'BDT': 'Tk', 'BGN': 'BGN', 'BHD': 'BD', 'BIF': 'FBu',
'BND': 'BN$', 'BOB': 'Bs', 'BRL': 'R$', 'BWP': 'BWP', 'BYR': 'BYR',
'BZD': 'BZ$', 'CDF': 'CDF', 'CHF': 'CHF', 'CLP': 'CL$', 'CNY': 'CN¥',
'COP': 'CO$', 'CRC': '₡', 'CVE': 'CV$', 'CZK': 'Kč', 'DJF': 'Fdj',
'DKK': 'Dkr', 'DOP': 'RD$', 'DZD': 'DA', 'EEK': 'Ekr', 'EGP': 'EGP',
'ERN': 'Nfk', 'ETB': 'Br', 'GBP': '£', 'GEL': 'GEL', 'GHS': 'GH₵',
'GNF': 'FG', 'GTQ': 'GTQ', 'HKD': 'HK$', 'HNL': 'HNL', 'HRK': 'kn',
# Description:
# Anyone can have voice or op
#
# Commands:
# hubot make me an op
# hubot make <name> an op
# hubot give me voice
# hubot give <name> voice
module.exports = (robot) ->