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 / node-14.16.0.patch
Last active April 29, 2021 01:39
Node 14.16.0 patch to support WASM on ARM64 Macs, based on the changes here: https://github.com/nodejs/node/pull/35986
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 January 6, 2019 11:37
React composition for inheritance
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 July 1, 2017 13:01
UIRefreshControl override so that app correctly idles while UI testing Raw

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 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
@koenpunt
koenpunt / permit_recursive_params.out
Last active August 26, 2021 06:46
ActionController::Parameters -> permit_recursive_params
{"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",

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 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 / 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 / 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

@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