All processes in ZSH/Bash under job control are in 3 states: foregrounded, backgrounded and suspended.
# run command in the foreground
command
# run commend in the background
#! /bin/sh | |
[ ! -d "$1" ] && echo "$1 is not a valid directory." && exit 1; | |
trap "umount \"${1}\"/tmp \"${1}\"/dev/null \"${1}\"/dev/pts \"${1}\"/dev/random \"${1}\"/dev/shm \"${1}\"/dev/urandom \"${1}\"/proc" EXIT INT TERM HUP PIPE && | |
mount --bind /tmp "${1}/tmp" && \ | |
mount --bind /dev/null "${1}/dev/null" && \ | |
mount --bind /dev/pts "${1}/dev/pts" && \ | |
mount --bind /dev/random "${1}/dev/random" && \ | |
mount --bind /dev/shm "${1}/dev/shm" && \ | |
mount --bind /dev/urandom "${1}/dev/urandom" && \ | |
mount --bind /proc "${1}/proc" && \ |
// https://github.com/shirriff/Arduino-IRremote | |
#include <IRremote.h> | |
IRsend irsend; | |
void setup() | |
{ | |
} |
// http://www.analysir.com/blog/2014/03/19/air-conditioners-problems-recording-long-infrared-remote-control-signals-arduino/ | |
// http://www.analysir.com/blog/wp-content/uploads/2014/03/Arduino_Record_Long_AirConditioner_Infrared_Signals_10.txt | |
// For LG AC | |
/* | |
Author: AnalysIR | |
Revision: 1.0 | |
This code is provided to overcome an issue with Arduino IR libraries | |
It allows you to capture raw timings for signals longer than 255 marks & spaces. |
We’re now going to clean up disk space on the VM so when we package it into a new Vagrant box, it’s as clean as possible. First, remove APT cache
$ sudo apt-get clean
Then, “zero out” the drive (this is for Ubuntu):
$ sudo dd if=/dev/zero of=/EMPTY bs=1M