Skip to content

Instantly share code, notes, and snippets.

@miku
miku / sc-dl.js
Created March 5, 2012 21:53 — forked from pheuter/sc-dl.js
Bookmarklet that generates download link for a Soundcloud upload
(function(d) {
var dl = d.createElement('a');
dl.innerText = 'Download MP3';
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1];
dl.download = d.querySelector('em').innerText+".mp3";
d.querySelector('.primary').appendChild(dl);
dl.style.marginLeft = '10px';
dl.style.color = 'red';
dl.style.fontWeight = 700;
})(document);
@miku
miku / Jack-Hack VM.py
Created July 21, 2012 19:59 — forked from jweissbock/Jack-Hack VM.py
the VM to turn Jack VM into Hack ASM
import glob
# declare types of commands
C_ARITMETIC = object()
C_PUSH = object()
C_POP = object()
C_LABEL = object()
C_GOTO = object()
C_IF = object()
C_FUNCTION = object()
@miku
miku / getAPOD.py
Created August 10, 2012 01:17 — forked from mnuck/getAPOD.py
Grabs the Astronomy Picture of the Day
#!/usr/bin/env python
# Grab the Astronomical Picture of the Day from NASA's site.
# Make it the desktop background, if it's a jpg
#
# Matthew Nuckolls
import urllib2
import re
import subprocess
base_url = "http://apod.nasa.gov/apod/"
@miku
miku / new_bashrc.sh
Created August 11, 2012 11:36 — forked from josephwecker/new_bashrc.sh
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful.
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
# Are you tired of trying to remember how darwin/mac-osx treat them differently from linux?
# Are you tired of not having your ~/.bash* stuff work the way you expect?
#
# Symlink all of the following to this file:
# * ~/.bashrc
@miku
miku / crime.py
Created September 12, 2012 23:08 — forked from stamparm/crime.py
It's not a crime to build a CRIME
# This is supposedly what CRIME by Juliano Rizzo and Thai Duong will do
# Algorithm by Thomas Pornin, coding by xorninja, improved by @kkotowicz
# http://security.blogoverflow.com/2012/09/how-can-you-protect-yourself-from-crime-beasts-successor/
import string
import zlib
import sys
import random
charset = string.letters + string.digits + "%/+="
@miku
miku / abbass.txt
Created December 14, 2012 22:44 — forked from anonymous/abbass.txt
* http://videos.arte.tv/de/videos/square--7100906.html, aufgerufen am: 14.12.2012
* 9.12.2012, 11:48, Arte.tv, 05:05
* Square 41
* http://de.wikipedia.org/wiki/Hiam_Abbass
# ========================================
# Testing n-gram analysis in ElasticSearch
# ========================================
curl -X DELETE localhost:9200/ngram_test
curl -X PUT localhost:9200/ngram_test -d '
{
"settings" : {
"index" : {
"analysis" : {
@miku
miku / crawler.py
Created April 10, 2013 05:17 — forked from jmoiron/crawler.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Simple async crawler/callback queue based on gevent."""
import traceback
import logging
import httplib2
import gevent
@miku
miku / kalman.py
Last active December 18, 2015 13:39 — forked from alexbw/kalman.py
#!/usr/bin/env python
# coding: utf-8
import numpy as np
class Kalman:
"""
USAGE:
# e.g., tracking an (x,y) point over time
@miku
miku / README.md
Last active December 18, 2015 13:49 — forked from anonymous/README.md

README

Data Sources, Transformations, Sinks. A language to express the flow of data. Textual and graphical. Minimal code. Maximum code reuse. 0-Install.