Skip to content

Instantly share code, notes, and snippets.

View gullitmiranda's full-sized avatar
🌎
Working from anywhere

Gullit Miranda gullitmiranda

🌎
Working from anywhere
View GitHub Profile
@nkbt
nkbt / .eslintrc.js
Last active May 1, 2024 21:15
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@ebidel
ebidel / coverage.js
Last active April 27, 2024 04:13
CSS/JS code coverage during lifecycle of page load
Moved to https://github.com/ebidel/puppeteer-examples
@josevalim
josevalim / watcher.sh
Last active February 28, 2024 07:42
A 1LOC bash script for re-running tests whenever a lib/ or test/ file changes keeping the same VM instance
# You will need fswatch installed (available in homebrew and friends)
# The command below will run tests and wait until fswatch writes something.
# The --stale flag will only run stale entries, it requires Elixir v1.3.
fswatch lib/ test/ | mix test --stale --listen-on-stdin
@gullitmiranda
gullitmiranda / deployment.yaml
Created February 22, 2022 23:19
Elixir + k8s startup/liveness/readiness probs
spec:
template:
spec:
containers:
- name: {{ .Chart.Name }}
# ...
#
## Application health checks
# initialDelaySeconds: Number of seconds after the container has started before startup, liveness or readiness probes are initiated.
# periodSeconds: How often (in seconds) to perform the probe. Default to 10 seconds. The minimum value is 1.
@christopherstott
christopherstott / import_zsh_history_to_fish.js
Created January 23, 2016 23:39
Import ZSH history to Fish
'use strict';
const fs = require('fs');
const expandHomeDir = require('expand-home-dir');
const zshHistoryRaw = fs.readFileSync(expandHomeDir('~/.zsh_history'), 'utf8');
const zshHistoryLines = zshHistoryRaw.split('\n');
const transformLine = line => {
try {
@nuxlli
nuxlli / init.fish
Created July 6, 2020 14:47
Fish k8s alias and scripts
function av-exec
aws-vault exec $argv[1] -- $argv[2..-1]
end
function av-shell
av-exec $argv[1] fish
end
alias kexec-dev="kubectl-exec firma-dev"
alias kexec-stage="kubectl-exec firma-stage"
@nuxlli
nuxlli / azure_upload_async.js
Last active August 13, 2019 10:52
Example uploaded file to azure with Q and without Q
var blob = require('azure').createBlobService()
, fs = require('fs')
, Q = require('q');
var options = { publicAccessLevel: 'blob' };
// With Q
var fsLstat = Q.nbind(fs.lstat, fs);
var getContainer = Q.nbind(blob.createContainerIfNotExists, blob);
var streamFile = Q.nbind(blob.createBlockBlobFromStream, blob);
@edorgeville
edorgeville / release.sh
Last active May 1, 2019 20:14
Creates a signed and zipaligned APK from your Ionic project
#!/bin/bash
#
# Creates a signed and zipaligned APK from your Ionic project
#
# Place your keystore in the root of your project and name it <company>.keystore
# Use this script as following :
# $ ./release.sh [company] [version]
#
# Don't forget to gitignore your key and your compiled apks.
#
@haggen
haggen / README.md
Last active September 11, 2018 03:19
boot2docker on nfs

Get boot2docker working with nfs instead of vboxsf.

Tested on:

- Boot2Docker-cli version: v1.6.0
  Git commit: 9894ae9
- Boot2Docker-cli version: v1.6.2
  Git commit: cb2c3bc
@nuxlli
nuxlli / README.md
Created July 14, 2016 18:19
Testing `react-native` applications

Sobre

Não é simples fazer testes de aplicações react-native no device, por isso a maior parte das pessoas preferem testar separadamente os componentes (test unitários) usando o node.js e usar outras ferramentas para test de integração.

Dessa forma os testes unitários são como qualquer outro teste node.js. Você é livre para usar qualquer framework de testes, apesar da documentação oficial recomendar o uso do jest.

Pontos chave

  • Referências: Por se tratar de uma tecnologia em franca fase de desenvolvimento, muitas das referências para react-native estão desatualizadas ou imprecisas. Tome bastante cuidado principalmente no que se refere a syntax de ES5 e ES6;