Skip to content

Instantly share code, notes, and snippets.

Alan Scherger flyinprogrammer

Block or report user

Report or block flyinprogrammer

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
flyinprogrammer /
Created Apr 15, 2019
Your Product is Broken: Artifactory
## Setup a VM
vagrant init ubuntu/xenial64
vagrant up
## Install OpenJDK 8
sudo add-apt-repository ppa:rpardini/adoptopenjdk
sudo apt-get update
sudo apt-get install adoptopenjdk-8-jdk-hotspot-set-default
flyinprogrammer /
Created Dec 17, 2018
Scripts for backing up and restoring Git repositories.
set -e
: "${BUNDLE_NAME:?Name of the bundle file should be the first argument.}"
: "${REPO_URL:?URL of the repo to clone should be the second argument.}"
View gist:bf01655381cd6ae1f587abc249c0ea73
### Keybase proof
I hereby claim:
* I am flyinprogrammer on github.
* I am flyinprogrammer ( on keybase.
* I have a public key ASBHVn2EEKCZ3NNvX-HgR6R95K7snb_xPI-GZTG9fTyixQo
To claim this, I am signing this object:
flyinprogrammer /
Created Feb 1, 2018
Install all the hashicorp tools.
#!/usr/bin/env bash
set -e
tee hashicorp.asc <<EOF
flyinprogrammer / cloud-init.bash
Last active Dec 26, 2017
switch clocksource to tsc on boot - ubuntu 16.04
View cloud-init.bash
## Step 1) install/ensure sysfsutils is installed
sudo apt-get install sysfsutils
# ---------------------------------
# Manage /sys filesystem. Requires sysfsutils package
## Turn off THP
sudo tee -a /etc/sysfs.d/thp.conf <<-EOF
kernel/mm/transparent_hugepage/enabled = never
kernel/mm/transparent_hugepage/khugepaged/defrag = 0
flyinprogrammer / dup2_ex1_4.go
Created Feb 15, 2016
dup2 from The Go Programming Language (ISBN-13: 978-0134190440)
View dup2_ex1_4.go
// dup2
// Prints the count and text of the lines that appear more than once in the input.
// It reads from stdin or from a list of named files.
// The original version simply printed the line and total count across all inputs.
// The exercise asked you to modify it to print all the anmes of the files in which
// each duplicated line occurs.
package main
View ifrepo.pp
if manage_repo
yumrepo {'repo':
enabled => 1,
gpgcheck => 1,
package { 'package':
ensure => latest,
if Yumrepo['repo'] was defined:
flyinprogrammer /
Created Dec 22, 2014
Ubuntu vagrant cleanup script
# Unmount project
umount /vagrant
# Tell installer to keep en_US
echo en_US > /etc/locale.gen
# Install localepurge - NO dpkg
apt-get install -y localepurge
apt-get remove -y pollinate overlayroot fonts-ubuntu-font-family-console cloud-init python-apport landscape-client juju chef open-vm-tools localepurge
flyinprogrammer /
Created Jun 11, 2013
inverted timezone in jruby?
class Time

  # Convert a time that is 'milliseconds since epoch' to a Time object
  # @return [Time] A time object created from a 'milliseconds since epoch' timestamp
  def self.from_millisecond_epoch time / 1000)
View gist:4490672
#!/usr/bin/env ruby
require 'date'
require 'mongoid'
class Email
include Mongoid::Document
field :headers
field :received
You can’t perform that action at this time.