Skip to content

Instantly share code, notes, and snippets.

Jürgen van Dijk juukie

Block or report user

Report or block juukie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@juukie
juukie / promise.finally.polyfill.js
Created Feb 27, 2019 — forked from spiralx/promise.finally.polyfill.js
Polyfill to add a finally() method to the Promise object
View promise.finally.polyfill.js
Promise.prototype.finally = function (callback) {
return this.then(
value => this.constructor.resolve(callback()).then(() => value),
reason => this.constructor.resolve(callback()).then(() => { throw reason })
)
}
View FadeInImage.js
import React from 'react-native'
var {
Image,
Animated,
View
} = React
module.exports = React.createClass({
getInitialState() {
@juukie
juukie / valet-part-2.sh
Created Nov 29, 2018 — forked from rcubitto/valet-part-2.sh
Configure subdomains in Laravel Valet - Part 2
View valet-part-2.sh
cd ~/.valet/Sites
ln -s example api.example
@juukie
juukie / macro.php
Created Nov 7, 2017
Laravel social media url macro
View macro.php
<?php
URL::macro('social', function ($name, $replacement = '#') {
return array_get([
'facebook' => 'https://www.facebook.com/mypage/',
'instagram' => 'https://www.instagram.com/mypage/',
'pinterest' => 'https://nl.pinterest.com/mypage/',
], $name), $replacement);
});
@juukie
juukie / takeAtLeast.js
Created Oct 5, 2017
Promise takeAtLeast
View takeAtLeast.js
// Add takeAtLeast method to Promise
/* eslint no-unused-vars: 0 */
Promise.prototype.takeAtLeast = function (time) {
return new Promise((resolve, reject) => {
const limiter = new Promise((resolve, reject) => {
setTimeout(resolve, time);
})
Promise.all([this, limiter]).then(([response, _]) => {
resolve(response)
View keybase.md

Keybase proof

I hereby claim:

  • I am juukie on github.
  • I am juukie (https://keybase.io/juukie) on keybase.
  • I have a public key whose fingerprint is C7EF 5740 EA57 DCCD BB9A 859E 6A6F AD7A 5ED4 90A4

To claim this, I am signing this object:

@juukie
juukie / README.md
Created May 17, 2016 — forked from sj26/README.md
Run MailCatcher in the background, always, on OS X
View README.md

Place me.mailcatcher.plist into ~/Library/LaunchAgents, then run launchctl load ~/Library/LaunchAgents/me.mailcatcher.plist.

If you use pow, echo 1080 > ~/.pow/mailcatcher and go to http://mailcatcher.dev, otherwise use http://localhost:1080.

Currently pow doesn't seem to pass websockets through correctly. Looking into this.

@juukie
juukie / mailcatcher-install.md
Created May 17, 2016 — forked from pitpit/mailcatcher-install.md
Install Mailcatcher on OSX
View mailcatcher-install.md
@juukie
juukie / copy.js
Created May 11, 2016 — forked from miguelmota/copy.js
Deep clone copy array with lodash.
View copy.js
var array = [{},{},{}];
var copy = _.map(array, _.clone);
@juukie
juukie / 100-wkhtmltoimage-special.conf
Last active Mar 20, 2016
CentOS verbetering font rendering voor PDF
View 100-wkhtmltoimage-special.conf
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hinting">
You can’t perform that action at this time.