Skip to content

Instantly share code, notes, and snippets.

View koenpunt's full-sized avatar
:octocat:
...

Koen Punt koenpunt

:octocat:
...
View GitHub Profile
@koenpunt
koenpunt / rename.sh
Last active December 12, 2015 08:39
Rename controllers, models, views ands tests in a rails project.
# List the files you need to rename you could run the following from the root of the project:
find . -name 'user*' | awk '{print $0; gsub(/user/, "system_user"); print $0}' | xargs -n2 echo "mv"
# actually move the files:
find . -name 'user*' | awk '{print $0; gsub(/user/, "system_user"); print $0}' | xargs -n2 mv
@koenpunt
koenpunt / view-manager.js
Created February 21, 2013 14:28
Very asic view manager for Backbone.js
/**
*
* Basic view manager
*
* var viewManager = new ViewManager({
* container: '#container'
* });
*
**/
@koenpunt
koenpunt / 0_reuse_code.js
Created January 20, 2014 15:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@koenpunt
koenpunt / tinder-api-documentation.md
Created February 2, 2016 00:37 — forked from rtt/tinder-api-documentation.md
Tinder API Documentation

Tinder API documentation

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!)

Note: this was written in April/May 2014 and the API may have changed since

API Details

@koenpunt
koenpunt / tinder-api-documentation.md
Last active February 10, 2016 23:31 — forked from boycarper/tinder-api-documentation.md
Tinder API Documentation

Tinder API documentation

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!)

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

API Details

@koenpunt
koenpunt / rspec_rails_cheetsheet.rb
Created March 25, 2016 13:25 — forked from mlr/rspec_rails_cheetsheet.rb
Rspec Rails cheatsheet with expect syntax (including capybara matchers)
# Model
expect(@user).to have(1).error_on(:username) # checks whether there is an error in username
expect(@user.errors[:username]).to include("can't be blank") # check for the error message
# Rendering
expect(response).to render_template(:index)
# Redirecting
@koenpunt
koenpunt / README.md
Last active May 2, 2016 16:47
UIRefreshControl override so that app correctly idles while UI testing

UIRefreshControl+testing.swift

You'll need to a -DTESTING compile flag to the configuration you use for testing to enable this extension only for test builds.

Imgur

Keybase proof

I hereby claim:

  • I am koenpunt on github.
  • I am koenpunt (https://keybase.io/koenpunt) on keybase.
  • I have a public key whose fingerprint is 26D3 50B3 B5D9 FBC2 CCDD 705F 37DB 22F4 1F0F C235

To claim this, I am signing this object:

@koenpunt
koenpunt / # phpsh - 2016-12-22_19-04-31.txt
Created December 22, 2016 18:17
phpsh (homebrew/php/phpsh) on macOS 10.12.2 - Homebrew build logs
Homebrew build logs for homebrew/php/phpsh on macOS 10.12.2
Build date: 2016-12-22 19:04:31