Skip to content

Instantly share code, notes, and snippets.

#working Nov.26.2012
sudo vi /etc/hosts #add hostname to 127.0.0.1 entry
sudo yum install git
git clone https://github.com/git/git.git
cd git
git checkout v1.8.0.1
sudo yum install make
sudo yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-ExtUtils-MakeMaker
sudo yum install gcc
sudo make prefix=/usr/local install
@hp9390
hp9390 / install.sh
Last active June 6, 2016 18:23 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
#!/usr/bin/env bash
# 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
@hp9390
hp9390 / docker-cleanup
Last active June 6, 2016 18:31 — forked from wdullaer/docker-cleanup
Cleanup unused Docker images and containers
#!/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'}'
@hp9390
hp9390 / cask_upgrade.sh
Created June 24, 2016 07:20
Script upgrading outdated brew casks
#!/usr/bin/env bash
(set -x; brew update;)
(set -x; brew cask update;)
(set -x; brew cleanup;)
(set -x; brew cask cleanup;)
red=`tput setaf 1`
green=`tput setaf 2`
## Other apps:
## Free Download Manager.app
## Irfanview.app
## Video Container Switcher.app
## Snapseed.app
brew install fish
brew install git
brew install htop
brew install jenv
#!/usr/bin/env bash
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
casks=( $(brew cask list) )
for cask in ${casks[@]}
do
@hp9390
hp9390 / docker-compose-install.sh
Created June 25, 2016 15:48 — forked from marszall87/docker-compose-install.sh
Simple script for installing latest Docker Compose on CoreOS >= 717.0.0
#!/bin/bash
mkdir -p /opt/bin
curl -L `curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url | select(contains("Linux") and contains("x86_64"))'` > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose

Keybase proof

I hereby claim:

  • I am hp9390 on github.
  • I am noropheos (https://keybase.io/noropheos) on keybase.
  • I have a public key ASDh0Shj_sqrOb_WG5t6CJDJOeH8Dr1vPGKcGS0afKCxZwo

To claim this, I am signing this object:

@hp9390
hp9390 / pacaur_install.sh
Last active February 23, 2017 19:02 — forked from tadly/pacaur_install.sh
A simple shell script to quickly / easily install "pacaur" on archlinux
#!/bin/sh
# If you are new to arch, I encourage you to at least read and understand what
# this script does befor blindley running it.
# That's why I didn't make a one-liner out of it so you have an easier time
# reading and understanding it :)
#
# This scripts purpose is purly to save you a few seconds on your new installation.
#
# Enjoy your time on an awesome system. Arch FTW!
@hp9390
hp9390 / onchange.sh
Created July 15, 2017 21:35 — forked from senko/onchange.sh
Watch current directory and execute a command if anything in it changes
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of