Skip to content

Instantly share code, notes, and snippets.

View Demeter's full-sized avatar

demeter Demeter

  • Phoenix Arizona
  • 17:08 (UTC -07:00)
View GitHub Profile
@Demeter
Demeter / gist:0e4afbebd84d3fe7062b6a6de5aa05fc
Created May 7, 2021 17:35 — forked from spudbean/gist:1558257
Look of disapproval and other emoticons
ಠ_ಠ
( ͡° ͜ʖ ͡°)
¯\_(ツ)_/¯
(╯°□°)╯︵ ┻━┻
http://www.fileformat.info/convert/text/upside-down.htm
WRTTN http://wrttn.me/30dbfd/
Unicode Emoticons
@Demeter
Demeter / shorturls.txt
Created September 14, 2013 03:58 — forked from code/shorturls.txt
0rz.tw
2tu.us
301url.com
6url.com
a2n.eu
adjix.com
azqq.com
b23.ru
b65.us
bit.ly
doInstall <- TRUE # Change to FALSE if you don't want packages installed.
toInstall <- c("plyr", "ggplot2")
if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
ANES <- read.csv("http://www.oberlin.edu/faculty/cdesante/assets/downloads/ANES.csv")
head(ANES)
ANES$PID3 <- factor(ANES$pid7) # Convert to three-level Party ID:
levels(ANES$PID3) <- c("Dem", "Dem", "Dem", "Ind", "Rep", "Rep", "Rep")
@Demeter
Demeter / gist:4326867
Created December 18, 2012 10:16 — forked from ibjhb/gist:1667543
Updated version with extra unpleasantries
Dear soon-to-be-former user,
We've got some fantastic news! Well, it's great news for us anyway. You, on
the other hand, are fucked.
We've just been acquired by:
[ ] Facebook
[ ] Google
[ ] Twitter
@Demeter
Demeter / pls2audio.html
Created February 22, 2012 00:11 — forked from Offbeatmammal/pls2audio.html
HTML5 and JavaScript to load a *.pls file to <audio> tag. Uses error and ended events to move to the next item
<! DOCTYPE html>
<html>
<head>
<title>PLS Processor</title>
<!-- needed for IE9 to ensure it treats page as HTML5 properly -->
<meta http-equiv="X-UA-Compatible" content="IE=9" >
</head>
<body>
<p>Audio PLS processor<p>
<audio id="audio" controls="controls"></audio >
@Demeter
Demeter / ben.py
Created January 10, 2012 08:37 — forked from fweez/ben.py
Benfords law bins for within directory file sizes
#!/usr/bin/env python
import os
import subprocess
# First, build up the results file. it'll have the form:
# 110 vidioc-g-dv-preset.xml
linecount_cmd = "rm results; for i in *; do find $i -execdir wc -c '{}' \; " + \
">> results; done;"
os.system(linecount_cmd)
@Demeter
Demeter / gist:1587880
Created January 10, 2012 08:35 — forked from cpu/gist:1276006
PyTwitter Avatars
###############################################################################
# Quick & Dirty script to download the Avatars of your Twitter Followers
# Daniel McCarney -- 10/10/11
#
# Emphasis on the quick & dirty. There's no error handling, and bad things
# are liable to happen if you have Twitter followers with malicious avatars
#
# Requirements: Python 2.6, python-twitter, OAuth keys*
#
# *Twitter requires OAuth authentication for the API calls this script uses.
@Demeter
Demeter / listing.py
Created January 10, 2012 08:30 — forked from kachok/listing.py
Pre-Nov 2011: Retrieve 1.usa.gov click archive
import urllib
import re
import time
data = urllib.urlopen('http://bitly.measuredvoice.com/bitly_archive/?C=M;O=D').read()
#print data
#datafiles name pattern - usagov_bitly_data2011-07-29-1311919454
@Demeter
Demeter / comments.xml
Created October 14, 2011 22:07 — forked from mojombo/comments.xml
Less Horrible XML Comments
<container>
<thing />
<!--
I think this is the least horrible way to format XML comment
blocks. Even though it wastes two lines, at least it doesn't
involve tons of indenting or horribly misaligned edges.
-->
<fooblah size="10" count="alot" />
</container>
@Demeter
Demeter / gfm.rb
Created October 14, 2011 22:03 — forked from mojombo/gfm.rb
Gem of Github Flavored Markdown
require 'digest/md5'
def gfm(text)
# Extract pre blocks
extractions = {}
text.gsub!(%r{<pre>.*?</pre>}m) do |match|
md5 = Digest::MD5.hexdigest(match)
extractions[md5] = match
"{gfm-extraction-#{md5}}"
end