This is how I install Jenkins on a bare system. I'm using Ubuntu 12.04 32bit
Always good to update the system packages after a fresh install:
package net.abhinavsarkar.util; | |
/** | |
* A (infinite) Fibonacci number generator. | |
* | |
* @author Abhinav Sarkar | |
*/ | |
public class Fibonacci extends Generator<Integer> { | |
/usr/sbin/groupadd -g 30119 jenkins | |
/usr/sbin/useradd -u 30119 -g jenkins jenkins | |
mkdir /home/jenkins | |
chown -R jenkins. /home/jenkins |
# A two-line colored Bash prompt (PS1) with Git branch and a line decoration | |
# which adjusts automatically to the width of the terminal. | |
# Recognizes and shows Git, SVN and Fossil branch/revision. | |
# Screenshot: http://img194.imageshack.us/img194/2154/twolineprompt.png | |
# Michal Kottman, 2012 | |
RESET="\[\033[0m\]" | |
RED="\[\033[0;31m\]" | |
GREEN="\[\033[01;32m\]" | |
BLUE="\[\033[01;34m\]" |
----- Esc ----- | |
Quick change directory: Esc + c | |
Quick change directory history: Esc + c and then Esc + h | |
Quick change directory previous entry: Esc + c and then Esc + p | |
Command line history: Esc + h | |
Command line previous command: Esc + p | |
View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
Print current working directory in command line: Esc + a | |
Switch between background command line and MC: Ctrl + o | |
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
title: Installing OpenStack Icehouse on Ubuntu 14.04 LTS in 10 Minutes | |
author: http://github.com/kordless | |
summary: A 10 minute guide on installing OpenStack Icehouse on Ubuntu 14.04 LTS. | |
type: guide | |
published: 1336779260 | |
meta: openstack |
# code goes in ~/.bash_profile | |
# tested on OS X | |
export APPIUM_HOME="$HOME/Desktop/appium" | |
export TEST_HOME="$HOME/path/to/tests" | |
export APPIUM_AVD="t18" | |
function three { | |
# does node exist? | |
[[ $(ps axo pid,command | grep "[0-9]\+ node" | wc -l) -gt 0 ]] && \ |
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32: