Skip to content

Instantly share code, notes, and snippets.

@dillera
dillera / fio_bench.sh
Created February 5, 2013 19:13
Benchmark FIO card
#!/bin/bash
######################################
#
# FusionIO Benchmarking
# 2013
if [ "$#" == "0" ]; then
echo "No arguments provided, please run like: fio_bench.sh /dev/[fiocontroller] /dev/[fiodevice]"
exit 1
fi
@dillera
dillera / gist:6541129
Created September 12, 2013 17:31
Create VMware fusion Vagrant clones for Centos6
# Vagrant VMWare Fusion Centos6
# HOWTO by Andrew Diller, dillera@gmail.com
# July 2013 v.1
#
#
# Vagrant version 1.2.4
# vmrun version 1.12.1 build-1040386
# Fusion - Professional Version 5.0.3 (1040386)
#
#

Setup a swap file in the stateful partition

Run these commands as root to create a 512 megabyte swap.

fallocate -l 512m /media/state/512MiB.swap
chmod 600 /media/state/512MiB.swap
mkswap /media/state/512MiB.swap
PROFILE=~/.bash_profile
sudo yum --enablerepo=rpmforge,epel,remi -y install gcc make zlib zlib-devel openssl-devel zsh
cd ~
test -d ~/.rbenv || git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
grep 'rbenv/bin' $PROFILE &>/dev/null || echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> $PROFILE
grep 'rbenv init' $PROFILE &>/dev/null || echo 'eval "$(rbenv init -)"' >> $PROFILE
grep 'unset RUBYLIB' $PROFILE &>/dev/null || echo 'unset RUBYLIB' >> $PROFILE
test -d ~/ruby-build || git clone https://github.com/sstephenson/ruby-build.git ~/ruby-build
cd ~/ruby-build && sudo ./install.sh
source $PROFILE
@dillera
dillera / make_fusion_box.sh
Created July 20, 2013 19:20
This bash script will create a vagrant box for you from a valid vmware fusion virtual machine directory. Currently, this is a manual process that is begging for any automation.
#!/bin/bash
#
# simple script to create a vagrant.box from a vmware fusion source VM
# andrew_diller@gmail.com July 2013
#
FUSIONTOOL='/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager'
METADATAFILE=metadata.json
if [ $# -lt 3 ]
@dillera
dillera / ldap-helloWorld.rb
Created June 14, 2016 19:36 — forked from trepidity/ldap-helloWorld.rb
Example of connecting to eDirectory with a Ruby LDAP script
require 'rubygems'
require 'net/ldap' #gem install --no-rdoc --no-ri net-ldap
ldap = Net::LDAP.new :host => "172.16.138.142",
:port => 389,
:auth => {
:method => :simple,
:username => "cn=admin,o=novell",
:password => "n0v3ll"
}
@dillera
dillera / ldap2csv.py
Created June 14, 2016 19:59 — forked from JosefJezek/ldap2csv.py
Export Users from Active Directory / LDAP to CSV file with Python
#!/usr/bin/python
# http://www.packtpub.com/article/python-ldap-applications-ldap-opearations
# sudo apt-get install python-ldap
import ldap
host = 'ldap://example.com:389'
dn = 'ldap@example.com'
@dillera
dillera / install_rbenv_osx.sh
Last active October 11, 2016 09:21
Install rbenv on OSX
# THE README:
# Do these by hand first!
#
# install compiler
## THIS WILL NOT WORK FOR YOU- Change
# wget https://nas.chalybs.net/software/Software/_MacOS/_Apple/command_line_tools_for_xcode_.dmg
# Install brew
# /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
@dillera
dillera / reclaimWindows10.ps1
Created January 8, 2017 02:01 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# Version: 1.7, 2016-08-15
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/
# THIS IS A PERSONALIZED VERSION
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
@dillera
dillera / bootstrap-ruby.sh
Created February 10, 2012 20:44
Install Ruby with rbenv/ruby-build on Centos6 with openssl
#!/bin/bash
set -e # exit on error
### README
# * installs your desired ruby versions using rbenv
# ** including openssl (needed by bundler)
# ** including sqlite (probably needed for rails apps)
#
# Before you start:
# * put ssh-keys in place