Skip to content

Instantly share code, notes, and snippets.

View garlandkr's full-sized avatar
🎯
Focusing

Ken Garland garlandkr

🎯
Focusing
View GitHub Profile
@garlandkr
garlandkr / Readme.md
Last active August 29, 2015 14:11 — forked from frvi/Readme.md

Description

Dashing widget to display a Jenkins build status and build progress

The widget is based on the meter-widget which is default in the Dashing installation

The widget can also see the progress of a "pre-build", i.e if you have a job triggering the actual build you want to define, you can configure this job in the jenkins_build.rb as a prebuild.

For more information, please see Coding Like a tosser

Download archiva from http://archiva.apache.org/download.cgi
extract it to /opt/archiva/
cd /opt/archiva/bin
./archiva start
thats it :)
access it http://server-ip:8080/archiva or
@garlandkr
garlandkr / .gitconfig
Last active August 29, 2015 14:08 — forked from pksunkara/config
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
@garlandkr
garlandkr / cw_get_loadavg.py
Created October 16, 2014 20:34
Get load_avg from Cloudwatch
import boto
import datetime
cw = boto.connect_cloudwatch()
instance_id = boto.utils.get_instance_metadata()['instance-id']
now = datetime.datetime.utcnow()
start_time = now - datetime.timedelta(days=1)
namespace = "System"
@garlandkr
garlandkr / write_ec2_hosts.py
Last active August 29, 2015 14:07
Write EC2 hosts to ssh_config
"""
First generate the hosts.yaml file using the ec2.py inventory script.
./inventory/ec2.py --refresh-cache > hosts.yaml
"""
import os
import yaml
user = "ec2-user"
---
# Deploys a new version of foo
- name: Deploy new version of foo
hosts: tag_type_appserver:&tag_stage_prod
user: ubuntu
sudo: true
gather_facts: false
serial: 1
vars_prompt:
#!/bin/bash
#==============
# Start
#==============
init() {
sudo apt-get update
sudo apt-get -y dist-upgrade
@garlandkr
garlandkr / ami-clean.sh
Last active May 31, 2024 10:38
Clean-up an Amazon EC2 instance before creating an AMI
#!/bin/bash
# Run this script with:
# bash <(curl -s https://gist.github.com/garlandkr/e80674b49270b0199fa6/raw/ami-clean.sh
function print_green {
echo -e "\e[32m${1}\e[0m"
}
print_green 'Clean Yum'
"""
Requeriments:
$ sudo pip install boto dnspython
Edit ~/.boto to use your AWS credentials
"""
import time
import sys