Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
...

Koen Punt koenpunt

:octocat:
...
View GitHub Profile
@koenpunt
koenpunt / node-14.16.0.patch
Last active Apr 29, 2021
Node 14.16.0 patch to support WASM on ARM64 Macs, based on the changes here: https://github.com/nodejs/node/pull/35986
View node-14.16.0.patch
From 42fdc91e497cc1fc7380b1bfd14216802ed4c63c Mon Sep 17 00:00:00 2001
From: Koen Punt <koen@koenpunt.nl>
Date: Tue, 16 Mar 2021 11:10:48 +0100
Subject: [PATCH] patch
---
common.gypi | 2 +-
deps/v8/BUILD.gn | 1 +
deps/v8/include/v8-platform.h | 8 ++-
deps/v8/src/base/page-allocator.cc | 14 ++++
@koenpunt
koenpunt / Composition.jsx
Last active Jan 6, 2019
React composition for inheritance
View Composition.jsx
const MyText = ({ style, ...props }) => (
<Text style={[styles.myText, style]} {...props} />
);
const LargerText = ({ style, ...props }) => (
<MyText style={[styles.largerText, style]} {...props} />
);
const styles = StyleSheet.create({
myText: {
@koenpunt
koenpunt / README.md
Last active Jul 1, 2017
UIRefreshControl override so that app correctly idles while UI testing Raw
View README.md

UIRefreshControl+Testing

Follow up on https://gist.github.com/koenpunt/cf8130bdfc432d31136b, but since method swizzling apparently doesn't work so well with Swift 3 anymore, I've now created it as Obj-C protocol.

When using in a Swift project, add it to the bridging header:

#import "UIRefreshControl+Testing.h"
@koenpunt
koenpunt / # phpsh - 2016-12-22_19-04-31.txt
Created Dec 22, 2016
phpsh (homebrew/php/phpsh) on macOS 10.12.2 - Homebrew build logs
View # phpsh - 2016-12-22_19-04-31.txt
Homebrew build logs for homebrew/php/phpsh on macOS 10.12.2
Build date: 2016-12-22 19:04:31
@koenpunt
koenpunt / permit_recursive_params.out
Last active Aug 26, 2021
ActionController::Parameters -> permit_recursive_params
View permit_recursive_params.out
{"tree"=>
{"name"=>"Australia",
"value"=>39904,
"id"=>6,
"description"=>"",
"string_array"=>["one", "two"],
"array_with_hashes"=>[{"a"=>"1"}, {"a"=>"2"}],
"type"=>{"name"=>"Other", "icon"=>"<i class=\"fa fa-pagelines\"></i>"},
"children"=>
[{"name"=>"Boxes",
View keybase.md

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 / rspec_rails_cheetsheet.rb
Created Mar 25, 2016 — forked from mlr/rspec_rails_cheetsheet.rb
Rspec Rails cheatsheet with expect syntax (including capybara matchers)
View rspec_rails_cheetsheet.rb
# 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
View tinder-api-documentation.md

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 / README.md
Last active May 2, 2016
UIRefreshControl override so that app correctly idles while UI testing
View README.md

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

View tinder-api-documentation.md

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