Skip to content

Instantly share code, notes, and snippets.

View shearluck's full-sized avatar

Noel Jarencio shearluck

  • Philippines
View GitHub Profile
@shearluck
shearluck / .bashrc
Created April 4, 2016 09:06
Vim/Tmux 256 color support
if [ "$TERM" = "xterm" ]; then
export TERM=xterm-256color
fi
alias tmux='tmux -2' # for 256color
alias tmux='tmux -u' # to get rid of unicode rendering problem
@shearluck
shearluck / Vagrantfile
Last active April 4, 2016 09:47
Vagrant Debian Jessie Box
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@shearluck
shearluck / Vagrantfile
Created April 4, 2016 09:43
DC Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
urxvt*foreground: rgb:a6/e2/2e
urxvt*background: rgb:08/08/08
urxvt*termName: rxvt-256color
urxvt*font: xft:Source Code Pro for Powerline-10:hinting=True;antialias=True;
urxvt*boldFont: xft:Source Code Pro for Powerline-10:hinting=True;antialias=True;
urxvt.perl-ext-common: default,matcher,fullscreen
urxvt.url-launcher: /usr/bin/xdg-open
urxvt.matcher.button: 1
urxvt.keysym.F11: perl:fullscreen:switch
@shearluck
shearluck / .xinitrc
Created December 16, 2016 03:25
Xinitrc
xrdb .Xresources
.screenlayout/luthorlex.sh
compton --config ~/.config/compton.conf -b
xscreensaver -no-splash &
feh --randomize --bg-fill ~/Wallpapers
exec awesome
@shearluck
shearluck / rc.lua
Created December 16, 2016 03:29
Awesome custom rc
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
awful.rules = require("awful.rules")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
@shearluck
shearluck / make-xfs-lvm.sh
Created January 18, 2019 09:54
Make XFS LVM
#!/bin/bash
set -xe
DEVICE=/dev/xvdb
parted -s $DEVICE mklabel gpt
parted -s $DEVICE unit %
parted -s $DEVICE mkpart primary xfs 1 100%
@shearluck
shearluck / make-lvm.sh
Last active April 19, 2019 17:09
Make LVM
# Wipe existing partition
sudo wipefs -a /dev/sdX
# Create PV
sudo pvcreate /dev/sdX
# Create VG
sudo vgcreate VolGroup00 /dev/sdX
# Create LV
@shearluck
shearluck / ec2-authorize-ssh-myip.sh
Created April 29, 2019 03:33
SSH authorize my IP
MYIP=`curl -s ipinfo.io/ip`
aws ec2 authorize-security-group-ingress --group-id $SG_ID --ip-permissions IpProtocol=tcp,FromPort=22,ToPort=22,IpRanges="[{CidrIp=$MYIP/32}]"
# How many hours
DURATION_HRS=1
let DURATION_MINS=$DURATION_HRS*60
aws ec2 request-spot-instances --block-duration-minutes $DURATION_MINS --launch-specification file://bastion-spot-specs.json