Skip to content

Instantly share code, notes, and snippets.

View fr34k8's full-sized avatar
🎯
Focusing

fr34k8

🎯
Focusing
View GitHub Profile
@fr34k8
fr34k8 / centos-6-4-x86_64.ks
Created January 15, 2016 13:26 — forked from andrewklau/centos-6-4-x86_64.ks
Multi-node Packstack File for Openstack Havana w/ Neutron
# This is a basic CentOS 6 spin designed to work in OpenStack and other
# virtualized environments. It's configured with cloud-init so it will
# take advantage of ec2-compatible metadata services for provisioning
# ssh keys and user data.
# Basic kickstart bits
text
skipx
cmdline
install
@fr34k8
fr34k8 / xxx.ps1
Created March 29, 2016 12:24 — forked from breezhang/xxx.ps1
fix posh-git ssh-agent not work "ssh-agent" not work because "posh-git" assert "ssh-agent " start up work already finish
#https://github.com/dahlbyk/posh-git.git
#http://markembling.info/2009/09/ssh-agent-in-powershell
#download http://gist.github.com/187305
#help resource
#http://haacked.com/archive/2011/12/19/get-git-for-windows.aspx
#https://help.github.com/articles/working-with-ssh-key-passphrases
#http://www.codeproject.com/Articles/292855/Setting-Up-Git-in-Windows-with-Diffmerge-Powershel
#solution 1 ---> install github windows 1.x you can select powershell shell
@fr34k8
fr34k8 / gist:a234ca7ccddfd6bcae96a68324d77e69
Created April 12, 2016 09:06
Resizing a filesystem using qemu-img and fdisk

Occasionally we will deploy a virtual instance into our KVM infrastructure and realize after the fact that we need more local disk space available. This is the process we use to expand the disk image. This process assumes the following:

  • You're using legacy disk partitions. The process for LVM is similar and I will describe that in another post.
  • The partition you need to resize is the last partition on the disk.

This process will work with either a qcow2 or raw disk image. For

@fr34k8
fr34k8 / config.yml
Created April 25, 2016 11:58
Parse YAML from bash with sed and awk.
development:
adapter: mysql2
encoding: utf8
database: my_database
username: root
password:
apt:
- somepackage
- anotherpackage
@fr34k8
fr34k8 / Rexfile
Created April 26, 2016 13:18 — forked from ferki/Rexfile
initialize as root, setup as normal user
use Rex -base;
user 'deployer';
password 'userpass';
sudo_password 'userpass';
sudo TRUE;
auth for => initialize =>
user => 'root',
password => 'rootpass';
@fr34k8
fr34k8 / rexify_osx.sh
Created April 26, 2016 13:24 — forked from pheisiph/rexify_osx.sh
Installing Rex on OS X isn't exactly straightforward. This is the best I could come up with.
# rexify OS X - install (R)?ex on OS X
# Installing (R)?ex (http://www.rexify.org) on OS X is a bit more involved
# and the documentation recomends MacPorts (https://macports.org/), even though
# we've collectively moved on towards the excellent Homebrew (http://brew.sh).
# They also suggest using perlbrew (http://perlbrew.pl), but then proceed
# installing Rex globally requiring sudo, which is exactly what perlbrew tries to
# avoid. Luckily Rex is available as a cpan module.
#
# I also installed homebrew in a different directory, in order to support multiple
@fr34k8
fr34k8 / bootstrap.rb
Created April 26, 2016 13:26 — forked from pheisiph/bootstrap.rb
Puppet Bootstrapping with capistrano
#config/recipes/bootstrap.rb
#capistrano recipe
namespace :bootstrap do
desc "Prepare the system to run Puppet. Requires root access (once)."
task :default do
set :user, 'root' # because we haven't provisioned any users yet
# install puppet standalone
run "wget http://apt.puppetlabs.com/puppetlabs-release-#{config['os_code_name']}.deb"
run "dpkg -i puppetlabs-release-#{config['os_code_name']}.deb"
@fr34k8
fr34k8 / pi_qemu.sh
Created May 30, 2016 17:03 — forked from JasonGhent/pi_qemu.sh
OSX raspberry pi emulation via QEMU. v2 attempt @ https://gist.github.com/JasonGhent/922f38f57c8cb77b10f3
# pulled from http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/
# expanded via http://superuser.com/questions/690060/how-to-enable-network-with-a-raspberry-pi-emulated-on-qemu
# tested with 2015-02-16-raspbian-wheezy.zip on OSX Mavericks
# OSX terminal
brew install qemu
# kernel-qemu is a linux kernel compiled with ARM1176 support.
# learn more here: http://xecdesign.com/compiling-a-kernel/
curl -OL http://xecdesign.com/downloads/linux-qemu/kernel-qemu
curl -o raspbian_latest.zip -L http://downloads.raspberrypi.org/raspbian_latest
@fr34k8
fr34k8 / 1. Install python3.5 & pip3.md
Created June 23, 2016 16:21 — forked from alyssaq/1. Install python3.7 & pip3.md
python3.5 setup on Mac 10.11 (El Capitan)
@fr34k8
fr34k8 / foreman
Created June 27, 2016 16:17
Foreman on NginX+Passenger
## Puppet Foreman
server {
listen 443 ssl;
ssl_certificate ssl/foreman.xxx.com.crt;
ssl_certificate_key ssl/foreman.xxx.com.key;
ssl_session_timeout 10m;
add_header Strict-Transport-Security max-age=15768000;
server_name foreman.xxx.com;