This file contains hidden or 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 | |
# Create a new repo at Github using git bash? | |
reponame="$1" | |
if [ "$reponame" = "" ]; then | |
read -p "Enter Github Repository Name: " reponame | |
fi | |
mkdir ./$reponame |
This file contains hidden or 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
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
## zsh tmux settings | |
ZSH_TMUX_AUTOSTART='true' | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each |
This file contains hidden or 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
#!/usr/bin/python | |
import subprocess | |
import re | |
# Get process info | |
ps = subprocess.Popen(['ps', '-caxm', '-orss,comm'], stdout=subprocess.PIPE).communicate()[0].decode() | |
vm = subprocess.Popen(['vm_stat'], stdout=subprocess.PIPE).communicate()[0].decode() | |
# Iterate processes |
This file contains hidden or 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
#!/usr/bin/env python | |
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
""" | |
Print system memory information. | |
$ python scripts/meminfo.py |
This file contains hidden or 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 | |
# Check if ntp is installed, and, if not, install it. | |
if ! rpm -qa | grep -qw ntp; then | |
yum install -y ntp | |
fi | |
# Start ntpd if it's not already running. | |
if ps aux | grep -v grep | grep "[n]tpd" > /dev/null | |
then |
This file contains hidden or 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 -x | |
TERRAFORM_VERSION="0.9.5" | |
PACKER_VERSION="0.10.2" | |
# create new ssh key | |
[[ ! -f /home/ubuntu/.ssh/hostykey ]] \ | |
&& mkdir -p /home/ubuntu/.ssh \ | |
&& ssh-keygen -f /home/ubuntu/.ssh/hostykey -N '' \ | |
&& chown -R ubuntu:ubuntu /home/ubuntu/.ssh |
This file contains hidden or 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
--- | |
- hosts: all | |
become: yes | |
tasks: | |
- name: Ensure NTP (for time synchronization) is installed. | |
yum: name=ntp state=present | |
- name: Ensure NTP is running. | |
service: name=ntpd state=started enabled=yes |
This file contains hidden or 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
# set shell | |
set -g default-shell /bin/zsh | |
# set window number to start from number | |
set -g base-index 1 | |
########################################################################### | |
# General options | |
# Watch for activity in background windows |
This file contains hidden or 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
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change. | |
export PATH="$PATH:$HOME/.rvm/bin" | |
# openssl | |
export PATH="/usr/local/opt/openssl/bin:$PATH" | |
# export PATH="$PATH:/usr/local/Cellar/openssl/1.0.2h/bin/openssl" | |
# sqlite | |
export PATH="/usr/local/opt/sqlite/bin:$PATH" |
This file contains hidden or 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
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
export PATH="/usr/local/bin:/usr/bin:$PATH" | |
# homebrew=/usr/local/bin:/usr/local/sbin | |
# export PATH=$homebrew:$PATH | |
# modify your PATH variable |
OlderNewer