Skip to content

Instantly share code, notes, and snippets.

View Demeter's full-sized avatar

demeter Demeter

  • Phoenix Arizona
  • 00:44 (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

Keybase proof

I hereby claim:

  • I am demeter on github.
  • I am ellie (https://keybase.io/ellie) on keybase.
  • I have a public key whose fingerprint is F845 257D 4679 6465 3815 FFF6 9117 83FB 4845 E4DD

To claim this, I am signing this object:

@Demeter
Demeter / Sidewiki syntax
Created January 19, 2014 14:15
Maybe this will be allowed by Google+ eventually
<p>Sidewiki supported the following HTML tags within entries:</p><br>
<p>Font formatting</p>
<p>
<ul>
<li>b <code> <b>Bold text</b></code> </li>
<li>em <code<em>Emphasize your text</em></code></li>
<li>i <code><i>Italicize your text</i></code></li>
<li>strike <code><strike>Strike out text</strike></code></li>
<li>strong <code><strong>strong font</strong></code></li>
<li>sup <code>Go <sup>superscript</sup></code></li>
@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 / 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:1288430
Last active February 1, 2026 22:30 — forked from brianblakely/gist:581868
Header tags of meta wisdom
<!DOCTYPE html>
<!-- Helpful things to keep in your <head/>
// Brian Blakely, 360i
// http://twitter.com/brianblakely/
-->
<head>
<!-- Disable automatic DNS prefetching.
Single-line version of pattern:
(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))
Extended version of same pattern:
(?xi)
\b
( # Capture 1: entire matched URL
@Demeter
Demeter / Oink questions on StackOverflow
Created October 14, 2011 18:13 — forked from iconara/Redis questions on StackOverflow
How to query StackOverflow for the most recent, unanswered but upvoted, questions tagged "oink"
#!/usr/bin/env ruby
require 'zlib'
require 'open-uri'
require 'json'
io = Zlib::GzipReader.new(open("http://api.stackoverflow.com/1.0/questions?tagged=oink&sort=votes&min=1"))
obj = JSON.parse(io.read)