As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
config
docs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public
- Sep 07, 2020 update docs for
npm version
echo copying local history file | |
history -a | |
cp .bash_history full_history | |
HOSTS="machine1.example.com machine2.example.com" | |
for i in $HOSTS; do | |
echo copying history file from $i | |
scp $i:~/.bash_history tmp_history.txt | |
cat tmp_history.txt >>full_history | |
wc -l tmp_history.txt |
A little lookup for commands I use frequently
git commit -a -m "My commit"
git add .
#!/usr/bin/env bash | |
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz | |
mkdir vim && tar xzvf vim.tar.gz -C vim | |
export PATH=$PATH:/app/vim/bin |
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
#!/bin/sh | |
# Cleanup docker files: untagged containers and images. | |
# | |
# Use `docker-cleanup -n` for a dry run to see what would be deleted. | |
untagged_containers() { | |
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1. | |
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6). | |
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470 | |
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}' |
# http://stackoverflow.com/a/28818420/484780 | |
git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1` |
// Awesomeness first | |
const _ = require('lodash'); | |
const proxyquire = require('proxyquire'); | |
const sinon = require('sinon'); | |
// Mocha + Chai are used here but feel free to use your test framework of choice ! | |
const chai = require('chai'); | |
const chaiAsPromised = require('chai-as-promised'); | |
chai.use(chaiAsPromised); |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis