Skip to content

Instantly share code, notes, and snippets.

Jay jay-johnson

Block or report user

Report or block jay-johnson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jay-johnson
jay-johnson / Installing Docker, Docker Machine, Docker Swarm, Docker Compose, and consul
Created Nov 20, 2015
Installing Docker, Docker Machine, Docker Swarm, Docker Compose, and consul
View Installing Docker, Docker Machine, Docker Swarm, Docker Compose, and consul
#!/bin/bash
# Allow toggling components to install and update based off flags
updateconsul=1
updatedocker=1
updatedockermachine=1
updatedockercompose=1
updatedockerswarm=1
consulversion="0.5.2"
View example .travis.yml
sudo: required
language: ruby
services:
- docker
before_install:
- echo "Testing Docker Hub credentials"
- docker login -e=$DOCKER_EMAIL -u=$DOCKER_USERNAME -p=$DOCKER_PASSWORD
@jay-johnson
jay-johnson / install-ycm-with-vim-src.sh
Last active Jul 21, 2019
Unofficial - Install YouCompleteMe with Vim from Source
View install-ycm-with-vim-src.sh
#!/bin/bash
function install_ycm() {
mkdir -p ~/.vim
curdir=$(pwd)
if [[ "$(which xcode-select)" != "" ]]; then
# you may need to install packages with: xcode-select --install
echo ""
echo "installing XQuartz"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null
@jay-johnson
jay-johnson / grow-fs.sh
Created Jun 1, 2019
Resize partition to maximum using parted in non-interactive mode
View grow-fs.sh
#!/bin/bash
# example from
# for donkey car
# https://serverfault.com/questions/870594/resize-partition-to-maximum-using-parted-in-non-interactive-mode
set -e
if [[ $# -eq 0 ]] ; then
echo 'please tell me the device to resize as the first parameter, like /dev/sda'
@jay-johnson
jay-johnson / Setting up X11 for use on an EC2 host.md
Last active May 3, 2019
Setting up X11 for use on an EC2 host
View Setting up X11 for use on an EC2 host.md

Run this on EC2 host

  1. Set these attributes in /etc/ssh/sshd_config
# cat /etc/ssh/sshd_config  | grep X11
X11Forwarding yes 
X11DisplayOffset 10
X11UseLocalhost yes 
View location: etc_sysconfig_network-scripts - ifcfg-eno1
DEVICE=eno1
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
View use system for libvirt.sh
export LIBVIRT_DEFAULT_URI="qemu:///system"
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
View iTerm2 settings for page up and down and front of line and end of line in vim.md

Set these under iTerm2 > Preferences > Keys

Vim Page Down

control + d

Send Text with "vim" Special Chars

to

View Asciinema Command Example
file=/data/asciinema/sa-2-fullstack; rm -f ${file}; asciinema rec ${file} -i 2 -t "title_here"
You can’t perform that action at this time.