How to install Bullet Train for oh-my-zsh on Ubuntu.
$ sudo apt-get install zsh
$ sudo apt-get install git-core
#!/usr/bin/env bash | |
function minikube_reset_vbox_dhcp_leases() { | |
# Check OS version | |
case $OSTYPE in | |
darwin*) | |
VBOX_CONFIG_DIR=Library | |
;; | |
linux*) |
<button onclick="recordStop()" id="record-stop-button">Record</button> | |
<button onclick="playAudio()" disabled id="play-audio-button">Play</button> | |
<script> | |
const recordAudio = () => | |
new Promise(async resolve => { | |
const stream = await navigator.mediaDevices.getUserMedia({ audio: true }); | |
const mediaRecorder = new MediaRecorder(stream); | |
const audioChunks = []; | |
mediaRecorder.addEventListener("dataavailable", event => { |
/** | |
* Creates a RegExp from the given string, converting asterisks to .* expressions, | |
* and escaping all other characters. | |
*/ | |
function wildcardToRegExp (s) { | |
return new RegExp('^' + s.split(/\*+/).map(regExpEscape).join('.*') + '$'); | |
} | |
/** | |
* RegExp-escapes all characters in the given string. |
sudo iptables -A INPUT -i lo -j ACCEPT | |
sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT | |
sudo iptables -A INPUT -j DROP | |
# Allow traffic coming from docker0 interface | |
sudo iptables -I INPUT 6 -i docker0 -p tcp --dport 3306 -j ACCEPT |
<?php | |
/** | |
* Gera a paginação dos itens de um array ou collection. | |
* | |
* @param array|Collection $items | |
* @param int $perPage | |
* @param int $page | |
* @param array $options | |
* | |
* @return LengthAwarePaginator |
max="$1" | |
date | |
echo "url: $2 | |
rate: $max calls / second" | |
START=$(date +%s); | |
get () { | |
curl -s -v "$1" 2>&1 | tr '\r\n' '\\n' | awk -v date="$(date +'%r')" '{print $0"\n-----", date}' >> /tmp/perf-test.log | |
} |
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
[ | |
"United States" => "us", | |
"Afghanistan" => "af", | |
"Albania" => "al", | |
"Algeria" => "dz", | |
"American Samoa" => "as", | |
"Andorra" => "ad", | |
"Angola" => "ad", | |
"Anguilla" => "ai", | |
"Antarctica" => "aq", |
#!/bin/bash | |
# Post install script for Ubuntu 18.04LTS and Mint 19LTS | |
# add the PHP PPA https://deb.sury.org/ | |
sudo add-apt-repository -y ppa:ondrej/php | |
# set up node sources | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
# add Sublime Text 3 stable to your sources |