#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
#Create bitbucket branch
##Create local branch
$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
master
* sync
apt-get install -y curl | |
# Install nginx | |
if [ "xx" = "x$(grep 'nginx' /etc/apt/sources.list )x" ] ; then | |
echo 'Installing nginx...' | |
echo ' | |
# Repositories for up to date nginx packages | |
deb http://nginx.org/packages/mainline/ubuntu/ precise nginx | |
deb-src http://nginx.org/packages/mainline/ubuntu/ precise nginx' >> /etc/apt/sources.list | |
curl -s http://nginx.org/keys/nginx_signing.key | apt-key add - | |
apt-get update > /dev/null |
#!/bin/sh | |
# script to automate the load and export to CSV of an oracle dump | |
# This script assumes: | |
# * you have the vagrant published key available locally in your .ssh directory | |
# * You have the Oracle VirtualBox image running locally | |
# ** ssh port-forwarding is configured for host port 2022 -> guess port 22. | |
set -e |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
#!/bin/bash | |
# A simple script to backup an organization's GitHub repositories. | |
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files | |
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up | |
# (if you're backing up a user's repos instead, this should be your GitHub username) | |
GHBU_UNAME=${GHBU_UNAME-"<CHANGE-ME>"} # the username of a GitHub account (to use with the GitHub API) | |
GHBU_PASSWD=${GHBU_PASSWD-"<CHANGE-ME>"} # the password for that account | |
GHBU_GITHOST=${GHBU_GITHOST-"github.com"} # the GitHub hostname (see comments) | |
GHBU_PRUNE_OLD=${GHBU_PRUNE_OLD-true} # when `true`, old backups will be deleted |
############################################################################################################### | |
# these are instructions for automating the suspend and shutdown of esxi vm's and host in case of a | |
# power failure. | |
# works with apc smartups 750xl and esxi 5.5u1 | |
############################################################################################################### | |
0# make a new VM and install Ubuntu-Server on it | |
1# install apcupsd | |
apt-get install apcupsd |
rsync -aHAXxv --numeric-ids --delete --progress -e "ssh -T -c arcfour -o Compression=no -x" user@<source>:<source_dir> <dest_dir> |
sudo apt-get update && sudo apt-get install usb-modeswitch && v=$(lsusb | grep "Huawei" | awk '{ print $6 }' | awk -F: '{ print $1 }'); p=$(lsusb | grep "Huawei" | awk '{ print $6 }' | awk -F: '{ print $2 }'); sudo usb_modeswitch -v $v -p $p -M '55534243123456780000000000000011062000000100000000000000000000' |
#!/bin/bash | |
### Copyright 2010 Manuel Carrasco Moñino. (manolo at apache.org) | |
### Copyright 2016 Patrick Double (pat at patdouble.com) | |
### | |
### Licensed under the Apache License, Version 2.0. | |
### You may obtain a copy of it at | |
### http://www.apache.org/licenses/LICENSE-2.0 | |
### | |
### A library for shell scripts which creates reports in jUnit format. |