Skip to content

Instantly share code, notes, and snippets.

View mitchellporter's full-sized avatar

Mitchell Porter mitchellporter

  • Seattle, WA
View GitHub Profile
@rtt
rtt / tinder-api-documentation.md
Last active May 5, 2024 15:28
Tinder API Documentation

Tinder API documentation

Note: this was written in April/May 2014 and the API may has definitely changed since. I have nothing to do with Tinder, nor its API, and I do not offer any support for anything you may build on top of this. Proceed with caution

http://rsty.org/

I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)

@btoews
btoews / twilio_data.json
Created April 15, 2014 12:36
Country codes and Twilio deliverability rates
{
"Afghanistan": {
"country_code": "+93",
"deliverability_rate": 77
},
"Albania": {
"country_code": "+355"
},
"Algeria": {
"country_code": "+213",
@samnm
samnm / ABSpringDemoViewController.m
Created April 20, 2014 03:03
A super-quick clone of Facebook Paper's springy table view
//
// ABSpringDemoViewController.m
// Springy
//
#import "ABSpringDemoViewController.h"
@interface ABSpringDemoViewController () <UITableViewDataSource, UITableViewDelegate> {
UITableView *_tableView;
CADisplayLink *_displayLink;
@stevenyap
stevenyap / Heroku_Staging.md
Last active June 11, 2019 16:09
Staging workflow on Heroku

This describes the workflow to use Heroku as a staging environment. It assumes you already have an existing heroku app in production.

# rename your git remote heroku to something else like production
git remote rename heroku production

# so now you will push as: git push production master

# create the staging app
heroku apps:create staging-appname
// the cell creation logic
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
UVLVideoCell *videoCell = (UVLVideoCell *)[collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([UVLVideoCell class]) forIndexPath:indexPath];
NSInteger index = 1 + indexPath.item%2;
NSURL *sampleURL = [[NSBundle mainBundle] URLForResource:[NSString stringWithFormat:@"flak_0%i", index] withExtension:@"mp4" subdirectory:@"videos"];
[videoCell loadVideoURL:sampleURL];
return videoCell;
@Kartones
Kartones / postgres-cheatsheet.md
Last active June 7, 2024 13:13
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@ericallam
ericallam / AppDelegate.m
Created May 22, 2014 14:49
Interactive Animated Transition Example
//
// AppDelegate.m
// AnimationExamplesiPhone
//
// Created by Eric Allam on 10/05/2014.
#import "AppDelegate.h"
#pragma mark - UIColor Additions
@andkon
andkon / DismissGravity.h
Created July 3, 2014 00:51
Animated transitions and UIKit Dynamics
@interface DismissGravity : NSObject <UIViewControllerAnimatedTransitioning>
@property (strong, nonatomic) UIDynamicAnimator *animator;
// These two need to be declared outside the try/catch
// so that they can be closed in the finally block.
HttpURLConnection urlConnection = null;
BufferedReader reader = null;
// Will contain the raw JSON response as a string.
String forecastJsonStr = null;
try {
// Construct the URL for the OpenWeatherMap query
#include <stdio.h>
#include <string.h>
int pnpoly(int nvert, float *vertx, float *verty, float testx, float testy);
float buffx[3];
float buffy[3];
main()
{
buffx[0] = 1.0; buffy[0] = 1.0;