Skip to content

Instantly share code, notes, and snippets.

View mastilver's full-sized avatar

Thomas Sileghem mastilver

View GitHub Profile
@mastilver
mastilver / babel-blade-typings.ts
Last active October 10, 2019 09:56
babel-blade typings
interface Movie {
id: string;
name: string;
}
interface MovieArguments {
id: string
}
interface CallableMovie extends Movie {
cd /usr/lib/slack/resources/app.asar.unpacked/src/static
mv slack-taskbar-highlight.png slack-taskbar-highlight-backup.png
cp slack-taskbar-rest.png slack-taskbar-highlight.png
@mastilver
mastilver / integration.js
Created August 17, 2017 10:51
sagas: unit vs integration tests
import { createAction } from 'redux-act';
import { call, takeLatest } from 'redux-saga/effects';
import { createStore, applyMiddleware } from 'redux'
import api from './api';
const action = createAction('action');
function *doSomething() {
yield call(api);
@mastilver
mastilver / .dockerignore
Created May 3, 2017 08:53
Mininal docker container build with pkg
node_modules
module.exports = {
plugins: [
"hyperline",
"hypercwd",
"hyper-alt-click",
"hyperterm-paste"
]
}
@mastilver
mastilver / auth0-github-recipe.js
Last active December 29, 2016 14:39
auth0-github-recipe
function(accessToken, ctx, cb) {
request.get('https://api.github.com/user', {
headers: {
'User-Agent': 'Auth0-App',
'Authorization': 'Bearer ' + accessToken
}
}, function(e, r, body) {
if (e) return cb(e);
if (r.statusCode !== 200) return cb(new Error('StatusCode: ' + r.statusCode));
@mastilver
mastilver / CreateUserCommand.js
Created December 21, 2016 19:12
Mediator pattern - Part 1
import handler from './handler'
type ICommand = {
username: string;
password: string;
email: string;
}
@handler('./createUserCommandHandler')
export default class CreateUserCommand {
@mastilver
mastilver / InstallHubFlow.ps1
Last active October 9, 2017 09:07
Hubflow windows installer
Add-Type -AssemblyName System.IO.Compression.FileSystem
$TEMP = $([environment]::GetEnvironmentVariable("TEMP", "User"))
$CWD = $(Split-Path $MyInvocation.MyCommand.Path)
$PATH = $([environment]::GetEnvironmentVariable("PATH", "User"))
$git_folder = "C:\Program Files\Git"
$git_bin_folder = "$($git_folder)\bin"
$tmp_folder = "$($TEMP)\$([guid]::NewGuid())";
@mastilver
mastilver / keybase.md
Created April 14, 2016 09:11
keybase.md

Keybase proof

I hereby claim:

  • I am mastilver on github.
  • I am mastilver (https://keybase.io/mastilver) on keybase.
  • I have a public key whose fingerprint is FF4F 6A71 2BF6 2640 228C 9572 4C21 B96D 4EF3 476C

To claim this, I am signing this object: