Skip to content

Instantly share code, notes, and snippets.

@hawkup
hawkup / .bashrc
Last active August 29, 2015 14:15
bashrc file
#http://serverfault.com/questions/3743/what-useful-things-can-one-add-to-ones-bashrc
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjf $1 ;;
*.tar.gz) tar xvzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xvf $1 ;;
@hawkup
hawkup / install vagrant ubuntu.md
Last active August 29, 2015 14:19
Installing Vagrant on Ubuntu 14.04
  • uninstall older vagrant
sudo rm -rf /opt/vagrant
sudo rm -rf /usr/bin/vagrant
sudo rm -rf ~/.vagrant.d
  • install VirtualBox
sudo apt-get install virtualbox
@hawkup
hawkup / Install java ubuntu.md
Last active August 29, 2015 14:19
Installing Java on Ubuntu 14.04

Install Java use PPA

  • install for apt-add-repository command
sudo apt-get install python-software-properties
  • then install java
sudo apt-add-repository ppa:webupd8team/java
@hawkup
hawkup / Install scala on ubuntu.md
Last active August 29, 2015 14:19
Install Scala on Ubuntu 14.04
  • download unzip file
wget http://downloads.typesafe.com/scala/2.11.6/scala-2.11.6.tgz
  • unzip file
tar xvf scala-2.11.6.tgz -C /usr/local/share
@hawkup
hawkup / .gitconfig
Created April 26, 2015 17:30
~/.gitconfig
[alias]
lg1 = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
lg = !"git lg1"
@hawkup
hawkup / use jshint jscs and csslint on ubuntu .md
Created May 4, 2015 23:06
use jshint jscs and csslint on ubuntu

requisite

  • nodejs

installation

  • jshint
sudo npm install -g jshint
  • jscs
@hawkup
hawkup / vagrant.md
Last active August 29, 2015 14:21
Vagrant

Initial vagrant

vagrant init hashicorp/precise64

box command

  • add
vagrant box add ADDRESS
@hawkup
hawkup / shell_script_install_environment.sh
Last active August 29, 2015 14:22
shell script install environment
#!/bin/bash
sudo apt-get update
sudo apt-get install git
wget -qO- https://get.docker.com/ | sh
sudo apt-get install nodejs
sudo apt-get install npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
@hawkup
hawkup / installation_grails.md
Last active August 29, 2015 14:22
Installation Grails on Ubuntu 14.04

#Prerequisite

  • JDK

#Installation

  1. Download grails

    wget https://github.com/grails/grails-core/releases/download/v3.0.1/grails-3.0.1.zip
    
@hawkup
hawkup / PHP_Mysql_Apache2_Phpmyadmin_ubuntu.md
Last active August 29, 2015 14:23
Install PHP Mysql Apache2 and Phpmyadmin on ubuntu 14.04

Apache2

sudo apt-get update
sudo apt-get install -y apache2
  • if you can not start apache2 service and get this message
apache2: Could not determine the server's fully qualified domain name, 
using 127.0.0.1 for ServerName