This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## | |
## Import an existing git repository (A) into another (B) | |
## | |
## Reference: http://gbayer.com/development/moving-files-from-one-git-repository-to-another-preserving-history/ | |
## | |
REPO_A="<git repo A url>" | |
REPO_A_DIR="<directory 1>" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: bitlbee | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Bitlbee IRC to other chat networks gateway | |
### END INIT INFO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo aptitude install libpam0g-dev | |
git clone https://code.google.com/p/google-authenticator/ | |
cd google-authenticator/libpam/ | |
make | |
sudo make install | |
google-authenticator | |
sudo cp /etc/pam.d/common-account /etc/pam.d/openvpn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma config(Motor, port1, leftMotor, tmotorVex393, openLoop, reversed) | |
#pragma config(Motor, port6, clawMotor, tmotorVex269, openLoop, reversed) | |
#pragma config(Motor, port7, armMotor, tmotorVex393, openLoop, reversed) | |
#pragma config(Motor, port10, rightMotor, tmotorVex393, openLoop) | |
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*// | |
task main () | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# note that this file needs execute permissions to run, which can be done by running "chmod u+rwx ./install_git_on_parallel.sh" (without quotes) | |
# this script based on: | |
# http://joemaller.com/908/how-to-install-git-on-a-shared-host/ | |
# http://stackoverflow.com/questions/9500898/compiler-error-msgfmt-command-not-found-when-compiling-git-on-a-shared-hosting | |
# update $PATH | |
echo "# the following two lines added by install_git_on_parallel.sh" >> ~/.bashrc | |
echo "export PATH=$HOME/opt/bin:$PATH" >> ~/.bashrc | |
echo ". $HOME/opt/contrib/completion/git-completion.bash" >> ~/.bashrc | |
. ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ st2 run core.remote hosts=100.73.114.124 whoami | |
. | |
id: 56847659a8479506930a36d7 | |
status: failed | |
parameters: | |
cmd: whoami | |
hosts: 100.73.114.124 | |
result: | |
error: "Unable to connect to any one of the hosts: [u'100.73.114.124']. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[defaults] | |
inventory = hosts | |
log_path = logs/ansible.log | |
host_key_checking = no | |
record_host_keys = no | |
ssh_args = -o ControlMaster=auto -o ControlPersist=30m | |
gather_facts = smart | |
library = /opt/ansible/lib: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
keyserver hkps://hkps.pool.sks-keyservers.net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
# Set User information | |
export _USER="rami" | |
export _NAME="Rami AlGhanmi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convert ISO to IMG format | |
hdiutil convert -format UDRW -o iso-image.img iso-image.iso | |
# Find USB Drive number N | |
diskutil list | |
diskutil unmountDisk /dev/diskN | |
# Write image to drive /dev/diskN where N is the disk number | |
sudo dd if=iso-image.img.dmg of=/dev/diskN |