Skip to content

Instantly share code, notes, and snippets.

@csinchok
csinchok / pillow.py
Created October 27, 2014 21:10
Pillow experiments
import sys
import math
from PIL import Image, ImageDraw
def get_line(center, angle, length):
y_diff = math.sin(angle) * length / 3
x_diff = math.cos(angle) * length / 3
start = (center[0] + x_diff, center[1] + y_diff)
@csinchok
csinchok / tabname.sh
Created December 4, 2014 15:31
Name ur tabs
function tabname {
if [ -z "$1" ];
then
TABNAME="${PWD##*/}";
else
TABNAME="$1";
fi
printf "\e]1;$TABNAME\a"
}
@csinchok
csinchok / editors.md
Last active August 29, 2015 14:13
HTML Editors

Questions:

  • Are there good tests?
  • Is the project mature?
    • How old is it?
    • How many contributors are there?
    • What's the adoption like?
  • What's the license?
  • How's the paste support? Specifically Safari, etc.
  • pre-wrap?
@csinchok
csinchok / favbomber.py
Created February 11, 2015 19:14
Fav Bombin'
import requests
from requests_oauthlib import OAuth1
import time
APP_API_KEY = "CONSUMER_KEY"
APP_API_SECRET = "CONSUMER_SECRET"
USER_ACCESS_TOKEN = "USER_ACCESS_TOKEN"
USER_ACCESS_TOKEN_SECRET = "USER_ACCESS_TOKEN_SECRET"
@csinchok
csinchok / README.md
Last active August 29, 2015 14:25
uWSGI SlowLoris Test

This is a test to see how uWSGI handles a slowloris attack. To run it:

In one terminal window, run the uWSGI server (you'll need a fairly recent version of uWSGI)

> uwsgi --http=127.0.0.1:8080 --master --module=testapp:application

In another window, run the attack:

> python loris.py
@csinchok
csinchok / The Longest Ride.md
Created October 8, 2015 21:54
The Longest Divvy Ride
# First let's grab all the station data

import csv

stations = {}

with open('data/Divvy_Stations_2015.csv') as csvfile:
@csinchok
csinchok / index.html
Last active October 8, 2015 21:57
The Longest Ride
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<title>The Longest Ride</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<style type="text/css">
/*!
<html>
<head>
<title>Hello World</title>
<style>
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
background-color: #C6B69B;

Chris

  • Andrew
  • Benjamina
  • Jane
  • Selasi
  • Michael

Amy

Chris

  • Selasi
  • Candace
  • Kate
  • Jane
  • Michael

Amy