start new:
tmux
start new with session name:
tmux new -s myname
{ | |
"name": "myApp", | |
"scripts": { | |
"git:config": "git config --global url.\"https://${GITHUB_TOKEN}:[email protected]\".insteadOf [email protected]:blacklane && git config --global --add url.\"https://${GITHUB_TOKEN}:[email protected]\".insteadOf ssh://[email protected]", | |
"preinstall": "if [ -n \"$GITHUB_TOKEN\" ]; then npm git:config; fi", | |
} | |
"devDependencies": { | |
// a bunch of private dependencies | |
} | |
} |
# Complete clean up | |
docker ps -a | grep -v CONTAINER | awk '{print $1}' | xargs docker stop | |
docker ps -a | grep -v CONTAINER | awk '{print $1}' | xargs docker rm | |
docker images | grep -v 'IMAGE ID' | awk '{print $3}' | xargs docker rmi | |
# Remove all stopped containers. | |
docker rm $(docker ps -a -q) | |
# Remove all untagged images | |
docker rmi $(docker images | grep "^<none>" | awk "{print $3}") |
import { fromJS } from 'immutable'; | |
import sjcl from 'sjcl'; | |
/* | |
* This function gets the encrypted object from the session storage, | |
* decrypt it and set the state back into the store. | |
*/ | |
export function recoverStateFromSession(key, state, password) { | |
const encryptedData = JSON.parse(sessionStorage.getItem(key)); | |
if(!encryptedData) { return state; } |
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
########################################## | |
# To run: | |
# curl -sSL https://gist.githubusercontent.com/sirkkalap/e87cd580a47b180a7d32/raw/d9c9ebae4f5cf64eed4676e8aedac265b5a51bfa/Install-Docker-on-Linux-Mint.sh | bash -x | |
########################################## | |
# Check that HTTPS transport is available to APT | |
if [ ! -e /usr/lib/apt/methods/https ]; then | |
sudo apt-get update | |
sudo apt-get install -y apt-transport-https | |
fi |
package spullara.util.concurrent; | |
import org.junit.BeforeClass; | |
import org.junit.Test; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.concurrent.*; | |
import java.util.concurrent.atomic.AtomicBoolean; |
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MySQL driver: | |
# gem install mysql2 | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: | |
adapter: mysql2 | |
encoding: utf8 |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
echo 'UseDNS no # if slow connection' >> /etc/ssh/sshd_config
echo 'PrintMotd yes # if you need motd messages' >> /etc/ssh/sshd_config
From /etc/pam.d/login && /etc/pam.d/sshd delete all strings included
session optional pam_motd.so