Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
git clone https://github.com/nanliu/snap-labs.git
cd snap-labs/intro-to-snap
./setup.sh
wget https://s3-us-west-2.amazonaws.com/snap.ci.snap-telemetry.io/snap/1.1.0/linux/x86_64/snaptel -O /usr/local/bin/snaptel
chmod 755 /usr/local/bin/snaptel
echo "waiting to configure grafana"
@nanliu
nanliu / go1.7.sh
Last active January 31, 2017 23:10
#!/bin/bash
set -e
set -u
GOPATH=~/gopath
export GOPATH
PATH="${GOPATH}/bin":$PATH
export PATH
proj_path="${GOPATH}/src/github.com/intelsdi-x/${1}"
mkdir -p "${proj_path}"
### Keybase proof
I hereby claim:
* I am nanliu on github.
* I am nanliu (https://keybase.io/nanliu) on keybase.
* I have a public key whose fingerprint is 9E55 404D 1FF9 D536 3C12 B47C 882C 9A83 C358 6229
To claim this, I am signing this object:
Puppet::Type.type(:archive).provide(:aws, :parent => :ruby) do
commands :aws => 'aws'
def download(filepath)
@aws_params = [
'cp',
resource[:source],
filepath,
]
# Download file
[vagrant@archive ~]$ time sudo puppet apply --modulepath "/etc/puppet/modules:/tmp/puppet/modules" --color=false --manifestdir /tmp/vagrant-puppet/manifests-b61a6d542f9036550ba9c401c80f00ef --detailed-exitcodes /tmp/vagrant-puppet/manifests-b61a6d542f9036550ba9c401c80f00ef/remote_checksum.pp
Notice: Compiled catalog for archive.localdomain in environment production in 0.63 seconds
Notice: /Stage[main]/Main/Archive[/tmp/hawtio-web-1.4.36.jar]/ensure: download archive from https://oss.sonatype.org/service/local/artifact/maven/content?g=io.hawt&a=hawtio-web&v=1.4.36&p=war&r=releases to /tmp/hawtio-web-1.4.36.jar with cleanup
Notice: Finished catalog run in 5.09 seconds
real 0m7.370s
user 0m3.157s
sys 0m0.714s
cat tests/demo.pp
$version = '0.20.5'
$file_name = "elasticsearch-${version}.deb"
$source_url = "https://download.elasticsearch.org/elasticsearch/elasticsearch/${file_name}"
$source_checksum = "${source_url}.sha1.txt"
$checksum = inline_template('<%= require "open-uri"; open(@source_checksum).read.split.first %>')
notice $checksum
nan@tenjin ~/src/puppet-elasticsearch ±archive⚡ » bundle exec puppet apply tests/demo.pp
@nanliu
nanliu / puppetdev
Last active August 29, 2015 14:16 — forked from logicminds/puppetdev
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst git
cinst git-credential-winstore
cinst console-devel
cinst sublimetext3
cinst poshgit
cinst dotpeek
cinst ruby -Version 2.0.0.48100
#!/bin/bash
# CentOS rbenv system wide installation script
# Forked from https://gist.github.com/1237417
# Installs rbenv system wide on CentOS 5/6, also allows single user installs.
# Install pre-requirements
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \
make bzip2 autoconf automake libtool bison iconv-devel git-core
# simplify github module convention
def github(name, options = nil)
options ||= {}
options[:user] ||= 'puppetlabs'
options[:version] ||= :master
options[:protocol] ||= 'git'
options[:prefix] ||= case options[:user]
when 'puppetlabs'
'puppetlabs'
when 'VMop', 'vmware'
________________________________________
From: [email protected] Behalf Of ...
Sent: Thursday, March 21, 2013 7:08:55 AM (UTC-06:00) Central Time (US &
Canada)
To: Relations, Customer
Subject: Please remove me
Hi,
We're receiving postal solicitations from Citi American Airlines