Skip to content

Instantly share code, notes, and snippets.

View hilkeheremans's full-sized avatar

Hilke Heremans hilkeheremans

View GitHub Profile
@hilkeheremans
hilkeheremans / .drone.yml
Created April 28, 2016 11:13
Drone CI with nodejs, npm and private modules
# drone.yml for node js CI with npm login
# Don't forget to configure DRONE_SERVER and DRONE_SERVER
# Now create a secrets.yml (OUTSIDE of your repo!!) (see other file)
# then run drone secure --repo <drone_repo_name> --in <path>/secrets.yml
build:
unit_tests:
image: risingstack/alpine:3.3-v4.2.6-1.1.3
commands:
- npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
- npm install
@hilkeheremans
hilkeheremans / index.js
Created April 29, 2016 19:29
Nodejs and Docker: proper exits
// add to index.js
exitOnSignal('SIGINT');
exitOnSignal('SIGTERM');
function exitOnSignal(signal) {
process.on(signal, function() {
console.log('\ncaught ' + signal + ', exiting');
// perform all required cleanup
process.exit(1);
});
@hilkeheremans
hilkeheremans / gist:20b2fa2b9c473f293f1eb32701c1b2d0
Created September 15, 2016 11:37
VS Code config for remote debugging on nodejs
# tsconfig.json
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"noImplicitAny": false,
"outDir": "dist/",
"removeComments": true,
"sourceMap": true,
"watch": true
@hilkeheremans
hilkeheremans / howto
Last active December 8, 2020 19:20
Fonts in React Native for Android vs iOS
REACT NATIVE IOS vs ANDROID FONT USE
Tested for React Native 0.41+
IOS:
- Place the fonts in the assets and make sure they are bundled along
- On iOS, fontFamily in Text match the Font Family name as described in Font Book (macOS). Font weights can be specified exactly.
ANDROID:
On Android, there are two ways of using fonts:
@hilkeheremans
hilkeheremans / genesis_public_key
Created February 21, 2018 18:34
genesis_public_key
04287792788baac704e5f0b8c2db55c74a7e6f9dbc60302c97b853c52d550b0f2d4926bd19986db2463edf2b8c72911fd719adc7f65b66420fe310c2afacd8831e
@hilkeheremans
hilkeheremans / app-state-enhancer.js
Created February 21, 2018 19:45
React and React Native Gists
import { AppState } from 'react-native'
export const AppStateTypes = {
APP_RESUMED: '@appstate/RESUMED',
APP_BACKGROUNDED: '@appstate/BACKGROUNDED',
APP_INACTIVE: '@appstate/INACTIVE'
}
/**
* Store Enhancer that injects app state actions whenever the app state changes
@hilkeheremans
hilkeheremans / custom.css
Created November 12, 2018 19:04
Slack custom CSS
/*
Copyright 2017 Bryan Keller (https://github.com/widget-)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software