Skip to content

Instantly share code, notes, and snippets.

@aronwoost
aronwoost / README.md
Created July 25, 2011 19:46
How to install LAMP on a EC2 Amazon AMI

Launch the instance and connect with ssh.

##Update the server

sudo yum update

##Install php and MySQL packages

@mzheng
mzheng / venmo_csv.txt
Last active August 27, 2021 16:01
Download Venmo Transactions as CSV
Prerequisite
JQ: brew install jq
Chrome/Safari Inspector
Log in and open https://venmo.com/#yours
Open Chrome/Safari Inspector
Go to Network Tab and filter for 'feed'
Right click and Save "feed" as "venmo_feed.json"
Run in Terminal:
cat venmo_feed.json | jq '.data[] | {actor: .actor.name, target: .transactions[0].target.name, type: .type, message: .message, date: .created_time, amount: .transactions[0].amount}' | jq -s -r '(map(keys) | add | unique) as $cols | map(. as $row | $cols | map($row[.])) as $rows | $cols, $rows[] | @csv' > venmo_feed.csv
@Samuirai
Samuirai / captcha.md
Created June 14, 2012 20:59
G-WAN Captcha Decode

G-WAN is a new free web server. They seem to be very proud of it, or at least just want to make a lot of money. Well anyway, in almost every sentence they write, they claim that they are 20% cooler than anything else. It feels a bit arrogant. I have to admit, I don't know a lot about web servers, so I can't speak to how good they are.

However, then I saw their Captcha example. I also don't know much about machine learning algorithms, OCR, and stuff like that, but I do know how to read pixels. I also know how to compare values with python :P

demo

They say the following about their Captcha:

@ghalimi
ghalimi / XNPV.js
Created January 30, 2013 02:15
XNPV Function
// Copyright (c) 2012 Sutoiku, Inc. (MIT License)
function XNPV(rate, values, dates) {
var result = 0;
for (var i = 0; i < values.length; i++) {
result += values[i] / Math.pow(1 + rate, moment(dates[i]).diff(moment(dates[0]), 'days') / 365);
}
return result;
}
@elaineo
elaineo / podcast.py
Last active March 16, 2019 21:19
Turn podcasts into Twitter threads
from TwitterAPI import TwitterAPI
import json
import logging
import time
from collections import OrderedDict
from random import random
"""
Assume 3 participants. You will need to create a Twitter account for each participant, and get API keys for each one.
"""
@soemarko
soemarko / theme.html
Created November 26, 2011 16:18
embed github gist to tumblr
<!-- Add the following lines to theme's html code right before </head> -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script>
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script>
<!--
Usage: just add <div class="gist">[gist URL]</div>
Example: <div class="gist">https://gist.github.com/1395926</div>
-->
@yanofsky
yanofsky / jobsday_static_charts.sh
Created April 4, 2014 13:09
QZ Two simple charts script
#download the data and save it as json for the overview via a python script
cd overview
python overview_scraper.py
cd ../sector
#download the data and save it as json for the sector info via python script
python sector_scraper.py
cd ..

Clojure is for Aristotelians

I was reading ["Clojure is for Type B Personalities"][2] and it sparked some thoughts I had about the intersection of western philosophy and programming.

One could say Mathematics is an extension of Epistemology. And all theory about computability are an extension of mathematics. I reckon how one thinks about computability and how one writes computable functions are a reflection of a person's natural epistemological tendencies. This is going to be just as unscientific as ["Clojure is for Type B Personalities"][2], but hopefully another

@mbostock
mbostock / .block
Last active August 27, 2017 21:09 — forked from dustin/index.html
Text Along a Path
license: gpl-3.0
@ncase
ncase / GLOGS.md
Last active January 20, 2017 19:04
GLOGS

"Do and Show and Tell"

###Do & Show & Tell

Don't try to explain everything with something interactive. Use interactivity only when interactivity works best, otherwise, supplement it with text & images. Also keep in mind the overlaps of Do & Show & Tell: when text interacts with the diagrams (e.g. Tangle), and vice versa.

Text: Best at describing very abstract concepts.
Graphs: Best at showing broad relationships at a glance.
Animations: Best at showing temporal relationships.
Interactives: Best at showing processes, systems, models. (See final slide on Procedural Rhetoric)