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
@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 {
@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
@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;
@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
@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"
@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.