Skip to content

Instantly share code, notes, and snippets.

View theycallmeswift's full-sized avatar

Swift theycallmeswift

View GitHub Profile
body {
background: black;
color: white;
}
div.container {
max-width: 500px;
margin: 100px auto;
border: 20px solid white;
padding: 10px;
@theycallmeswift
theycallmeswift / app.py
Created August 28, 2015 17:10
A sample implementation of My MLH using Flask. Requirements: Python 2.7, Flask, and Requests.
from flask import Flask, jsonify, make_response, redirect, request
import urllib
import requests
app = Flask(__name__)
# Config
callback = 'http://localhost:5000/auth/mlh/callback'
client_id = '[ INSERT CLIENT ID ]'
client_secret = '[ INSERT CLIENT SECRET ]'
abridgments
abrogations
abrupter
abscessing
abscissae
abstractnesses
accessioning
acclimatizes
accusatives
acridest
@theycallmeswift
theycallmeswift / uikit.html
Created July 8, 2014 22:24
This is the start of a generic bootstrap UI Kit page.
<style>
.row { margin: 30px 0 60px; }
</style>
<div class="container">
<div class="row">
<div class="col-md-3">
<h3>Headers & Body</h3>
</div>
@theycallmeswift
theycallmeswift / Y-Hack Top 10 by Attendance
Created November 10, 2013 04:37
Y-Hack Top 10 Schools by Attendance
1. University of Maryland
2. Brown University
3. McGill University
4. Yale University
5. Virginia Tech
6. Massachusetts Institute of Technology
7 .Columbia University
8. Rutgers, The State University of New Jersey
9. Harvard University
10. University of Waterloo
@theycallmeswift
theycallmeswift / api_dev_tools.md
Created October 24, 2013 21:18
The list of awesome API Developer Tools from John Sheehan's (https://twitter.com/johnsheehan) talk at API Strategy SF (http://www.apistrategyconference.com/2013SF/)
@theycallmeswift
theycallmeswift / index.html
Created October 13, 2013 00:44
Templates with Handlebars - http://handlebarsjs.com/
<html>
<head>
<title>Foo</title>
</head>
<body>
<ul class="slider">
</ul>
<script src="js/jquery-2.0.3.min.js"></script>
<script src="js/handlebars.js"></script>
var casper = require('casper').create({
verbose: true,
logLevel: 'debug',
pageSettings: {
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4'
}
});
var url = 'https://www.pinterest.com/login/';
from flask import Flask, request
app = Flask(__name__, static_folder='static', static_url_path='')
@app.route('/data', methods=['GET', 'POST'])
def post_data():
data = request.data # but data will be empty unless the request has the proper content-type header...
if not data:
data = request.form.keys()[0]
# mongo.db.test1_collection.insert({ city: data })
@theycallmeswift
theycallmeswift / fizzbuzz.erl
Last active December 21, 2015 11:49
Fizzbuzz implemented in Erlang
%% DISCLAIMER: Please excuse my style, I don't write erlang.
-module(fizzbuzz).
-export([fizz_buzz/0]).
fizz_buzz() ->
fizz_buzz(1).
fizz_buzz(N) when N =< 100 ->
if
N rem 15 == 0 ->