Skip to content

Instantly share code, notes, and snippets.

@mt3
mt3 / gist:3036016
Created July 2, 2012 22:03 — forked from ttscoff/gist:899757
demo script of ttscoff's pinboard backup sync
#!/usr/bin/ruby
%w[fileutils ftools set zlib].each do |filename|
require filename
end
# Load the Marshal dump to a hash
def load file_name
begin
file = Zlib::GzipReader.open(file_name)
@mt3
mt3 / friends_recommender_exp.py
Created September 3, 2012 19:09 — forked from marcelcaraciolo/friends_recommender_exp.py
friends recommender with explanations
#-*-coding: utf-8 -*-
'''
This module represents the recommender system for recommending
new friends based on 'mutual friends'.
'''
__author__ = 'Marcel Caraciolo <[email protected]>'
@mt3
mt3 / pandas-heroku.md
Created September 8, 2012 23:10 — forked from nicolashery/pandas-heroku.md
Deploy Python app using Pandas on Heroku

Deploy Python app using Pandas on Heroku

2012-09-08

This document explains how to deploy a Python app that uses the Pandas library on Heroku.

Heroku builds Numpy (one of Pandas' requirements) fine. However, when trying to deploy an app with both numpy and pandas in its requirements.txt file (or even just pandas), for some reason it fails

@mt3
mt3 / latex.template
Created September 12, 2012 15:24 — forked from michaelt/latex.template
Simple Pandoc default.latex with comments
%!TEX TS-program = xelatex
\documentclass[12pt]{scrartcl}
% The declaration of the document class:
% The second line here, i.e.
% \documentclass[12pt]{scrartcl}
% is a standard LaTeX document class declaration:
% we say what kind of document we are making in curly brackets,
% and specify any options in square brackets.
@mt3
mt3 / nonumberedcaptions.latex
Created September 12, 2012 15:24 — forked from rwst/nonumberedcaptions.latex
pandoc LaTeX template that removes "Figure #" automatic label from caption
\documentclass$if(fontsize)$[$fontsize$]$endif${article}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifxetex
\usepackage{fontspec,xltxtra,xunicode}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\else
\ifluatex
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
@mt3
mt3 / flaskapp.py
Created September 17, 2012 04:36 — forked from kennethreitz/flaskapp.py
My typical flask app base
# -*- coding: utf-8 -*-
import os
from flask import Flask
from flask_heroku import Heroku
from flask_sslify import SSLify
from raven.contrib.flask import Sentry
from flask.ext.celery import Celery
@mt3
mt3 / .gitignore
Created September 21, 2012 12:44 — forked from karmi/.gitignore
Import your Gmail messages into ElasticSearch and search them with a simple web application.
.DS_Store
*.log
Gemfile.lock
@mt3
mt3 / git-branches-by-commit-date.sh
Created September 24, 2012 18:38 — forked from jasonrudolph/git-branches-by-commit-date.sh
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
@mt3
mt3 / scrape.js
Created October 3, 2012 05:46 — forked from alexmcpherson/scrape.js
Casper.js vimrc scraper
var casper = require("casper").create();
var url = "https://github.com/search?langOverride=VimL&language=&q=vimrc&repo=&type=Repositories&start_value=" + casper.cli.get(0);
var repoLinks = [];
var fileLinks = [];
function getRepoLinks() {
var links = [];
$("div.results .result h2 a").each(function(i,el){
links.push(el.href);
});
@mt3
mt3 / gist:3888549
Created October 14, 2012 13:19 — forked from mattb/gist:1244665
Top 100 ascii-only 2-shingles on Twitter sample for the last 6 hours. Source at https://github.com/mattb/Storm-Try/
in the: ************************************* (3765)
i love: *************************** (2781)
to be: ************************** (2637)
of the: ********************* (2150)
if you: ********************* (2150)
on the: ******************** (2081)
i just: ****************** (1838)
i was: ****************** (1829)
i don't: ****************** (1825)
i have: ****************** (1802)