sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator
Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").
!#/bin/bash | |
for file in *.jsx; do | |
dir=${file%.js*} | |
if [ -e $dir ]; then | |
mv "$file" "$dir" | |
else | |
mkdir -p "$dir" | |
mv "$file" "$dir" | |
fi | |
done |
!#/bin/bash | |
for dirs in ~/Projects/hostel/public_html/assets/reservation/components/*; do | |
if [ -d "$dirs" ]; then | |
for dir in $dirs; do | |
for comp in $dir/*; do | |
if [ -d "$comp" ]; then | |
for pol in $comp/*.jsx; do | |
cd $comp && touch package.json | |
str=${pol##*/} | |
rjsx=${str//.jsx} |
docker_running=$(docker-machine ls | grep default) | |
if [[ "$docker_running" == *"Stopped"* ]] | |
then | |
docker-machine start | |
eval "$(docker-machine env)" | |
env | grep "DOCKER_HOST" | |
elif [[ "$docker_running" == *"Running"* ]] | |
then | |
eval "$(docker-machine env)" | |
fi |
var test = require('tape'); | |
test('setup', function (t) { | |
// ... | |
t.end(); | |
}); | |
// tests go here | |
test('teardown', function (t) { |
GET /users | |
response: | |
{ | |
data: [ | |
{ | |
id: 1, | |
name: John Doe | |
}, |
'use strict'; | |
const crypto = require('crypto'); | |
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bytes (32 characters) | |
const IV_LENGTH = 16; // For AES, this is always 16 | |
function encrypt(text) { | |
let iv = crypto.randomBytes(IV_LENGTH); | |
let cipher = crypto.createCipheriv('aes-256-cbc', new Buffer(ENCRYPTION_KEY), iv); |