View gitconfig
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
; vim:set filetype=dosini: | |
[alias] | |
fap = fetch --all --prune | |
sb = status -sb | |
st = status -s | |
co = checkout | |
br = branch | |
bv = branch -avv | |
rv = remote -v |
View bash_aliases
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 | |
# shellcheck disable=SC1073,SC1007,SC1072,SC1090,SC1091,SC2015 | |
if [[ $UID -ne 0 ]]; then | |
if ! type -t __git_ps1 >/dev/null 2>&1 && test -e /usr/share/git-core/contrib/completion/git-prompt.sh; then | |
. /usr/share/git-core/contrib/completion/git-prompt.sh | |
fi | |
if type -t __git_ps1 >/dev/null 2>&1; then | |
PS1='[\[\033[32m\]\u@\h\[\033[00m\] \[\033[36m\]\W\[\033[31m\]$(__git_ps1)\[\033[00m\]] \$ ' |
View Autounattend.xml
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
<?xml version="1.0" encoding="utf-8"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<settings pass="windowsPE"> | |
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<SetupUILanguage> | |
<UILanguage>en-US</UILanguage> | |
</SetupUILanguage> | |
<InputLocale>en-US</InputLocale> | |
<SystemLocale>en-US</SystemLocale> | |
<UILanguage>en-US</UILanguage> |
View fork.cpp
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
//This is all pretty much from the ReactOS project... | |
#pragma once | |
#define _WIN32_WINNT 0x0502 // Change this to the appropriate value to target other versions of Windows. | |
#define DPRINT(...) | |
#define DPRINT1(...) | |
#include <stdlib.h> | |
#include <tchar.h> |
View make-gcc
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 | |
GCC_VER=4.5.2 | |
wget -O /tmp/gcc-$GCC_VER.tar.bz2 ftp://ftp.gnu.org/gnu/gcc/gcc-$GCC_VER/gcc-$GCC_VER.tar.bz2 | |
tar jxvf /tmp/gcc-$GCC_VER.tar.bz2 | |
cd gcc-$GCC_VER | |
mkdir -p $HOME/opt/gcc/gcc-$GCC_VER | |
./configure --prefix=$HOME/opt/gcc/gcc-$GCC_VER --with-mpc | |
CPUCOUNT=`grep processor /proc/cpuinfo | wc -l` | |
make -j$CPUCOUNT |
View secure-aes-gen.sh
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 | |
# | |
# Create a variable `$key` for use in powershell as a AES encyrption key | |
# constant with (ConvertFrom-SecureString)[https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/convertfrom-securestring?view=powershell-7.2)] | |
# | |
# param: $1 secret key (optional, default: secret) | |
# param: $2 cipher (optional, default: aes-256-cbc) | |
# output: An byte array (in decimals), the size of the encryption key (AES256 = 32 bytes) | |
genkey() { |
View g++-5.sh
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 | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common | |
add-apt-repository ppa:ubuntu-toolchain-r/test | |
apt-get update | |
DEBIAN_FRONTEND=noninteractive apt-get install -y g++-5 gcc-5 |
View iam-assume-role.sh
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 | |
# | |
# Assume the given role, and print out a set of environment variables | |
# for use with aws cli. | |
# | |
# To use: | |
# | |
# $ eval $(./iam-assume-role.sh) | |
# |
View route53-asg-rrdns.sh
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 | |
# | |
# Get all IPs from an autoscale group and update set the local ip as | |
# equal weight A entries (round robin dns). Takes autoscale group as | |
# parameter. | |
# | |
# Amit Bakshi | |
# 10/21/2014 | |
# |
View docker-direct-lvm.sh
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 | |
set -e | |
## striping seems to break docker | |
#STRIPE="-i2 -I64" | |
#DEVS="/dev/xvdf /dev/xvdg" | |
DEVS="$1" | |
if [ -z "$DEVS" ]; then | |
echo >&2 "Specify which block devices to use" | |
exit 1 |
NewerOlder