Skip to content

Instantly share code, notes, and snippets.

😅

Tim Nolet tnolet

😅
Block or report user

Report or block tnolet

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
View setup-statsd-centos.sh
# First do a fresh install of CentOS 5.7 i386, server configuration (no GUI)
# This should be performed as root since it's going to be installing a bunch of stuff
# --- Update things to make sure we have the latest patches ---
# Add EPEL so we can get reasonably recent packages
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# --- Install all the packages --- #
yum -y install python-whisper python-carbon graphite-web python-memcached python-ldap httpd memcached
@tnolet
tnolet / iso_grid_with_rectangles
Last active Dec 25, 2015
An isometric grid based on SVG rectangles. The isometry is generated through an matrix translation. Not ideal, but pretty quick....
View iso_grid_with_rectangles
<!DOCTYPE html>
<html>
<head>
<title>D3 iso test grid</title>
<link rel="stylesheet" href="css/iso_grid.css">
<script src="d3/d3.v3.min.js" charset="utf-8"></script>
<script src="jquery/jquery-1.10.2.min.js" charset="utf-8"></script>
</head>
<body>
@tnolet
tnolet / puppetdb_postgres_hacks.md
Last active Jul 22, 2019
PuppetDB is awesome. Here's some tips on accessing the data in the Postgresql database...most of 'm just reminders for myself.
View puppetdb_postgres_hacks.md

NB: The following examples where done on Puppet Enterprise 3.0 running on Centos 6. Should be similar for open source versions, except for some file locations.

1. Logging into the PuppetDB PostgresQL database on Linux

The easiest way to snoop around in de actual PuppetDB postgres database is using the command prompt. You have to be the peadmin user though. Couldn't get it working just under root.

[root@master bin]# sudo su - pe-postgres -s /bin/bash
-bash-4.1$ /opt/puppet/bin/psql
psql (9.2.4)
Type "help" for help.
@tnolet
tnolet / gist:7334360
Last active Dec 27, 2015
Using RubyMine with Vagrant running Ruby
View gist:7334360

Creating a RVM based Ruby environment on Vagrant

Update all packages

yum update

Install RVN. note: Don't do this as a root user!

curl -L get.rvm.io | bash -s stable
@tnolet
tnolet / gist:7361441
Last active Dec 5, 2018
Install collectd 5.4 on Centos 6.x and make it spit out cool metrics. Copied from http://linuxdrops.com/install-collectd-statistics-collecter-on-centos-rhel-ubuntu-debian/ and tweaked for your and my pleasure. For all other cool options, check the provided link.
View gist:7361441
#!/bin/bash
# Perform installation as root
# Install prereqs
yum -y install libcurl libcurl-devel rrdtool rrdtool-devel rrdtool-prel libgcrypt-devel gcc make gcc-c++
# Get Collectd, untar it, make it and install
wget http://collectd.org/files/collectd-5.4.0.tar.gz
tar zxvf collectd-5.4.0.tar.gz
@tnolet
tnolet / gist:8398447
Last active Jan 3, 2016
Mcollective tricks
View gist:8398447
# Some mcollective tricks are very poorly documented. Like running an arbitrary shell command.
# This command removes the SSL dir on all puppet agents.
mco rpc puppetral create type=exec title="/bin/rm -rf /etc/puppetlabs/puppet/ssl" user="root" -F fact_is_puppetmaster=false
# You could then run the puppet agent again to request an new certificate from the master. This command does this with a concurrency of 2 agents.
mco puppetd -v runall 2 -F hostname=/^somehost/
@tnolet
tnolet / gist:dde204cc8abb6996e8fe
Last active Aug 29, 2015
testing gin deep struct checking
View gist:dde204cc8abb6996e8fe
save this as main.go
###
package main
import (
"github.com/gin-gonic/gin"
"net/http"
)
@tnolet
tnolet / monarchs
Created Jul 2, 2015
Vamp test deployment with monarch test app. Hit the :9050 endpoint on Vamp Router with the actions mentioned here https://github.com/magneticio/monarch#api
View monarchs
name: monarchs:1.0
endpoints:
frontend.port: 9050
clusters:
frontend:
services:
-
breed:
name: monarch_front:0.1
deployable: magneticio/monarch:0.1
@tnolet
tnolet / jenkins_pipeline1.groovy
Last active Aug 16, 2017
vamp+dcos+jenkins guide: deploy initial blueprint
View jenkins_pipeline1.groovy
#!groovy
node {
def nodeHome = tool name: '8.3.0', type: 'jenkins.plugins.nodejs.tools.NodeJSInstallation'
env.PATH = "${nodeHome}/bin:${env.PATH}"
// !! Replace these with your own settings !!
def gitRepo = 'https://github.com/magneticio/simpleservice/'
def dockerHub = 'https://registry.hub.docker.com'
def dockerHubCreds = 'docker-hub-login'
def dockerRepo = 'magneticio'
@tnolet
tnolet / jenkins_pipeline2.groovy
Last active Aug 16, 2017
vamp+dcos+jenkins guide
View jenkins_pipeline2.groovy
#!groovy
node {
def nodeHome = tool name: '8.3.0', type: 'jenkins.plugins.nodejs.tools.NodeJSInstallation'
env.PATH = "${nodeHome}/bin:${env.PATH}"
// !! Replace these with your own settings !!
def gitRepo = 'https://github.com/magneticio/simpleservice/'
def dockerHub = 'https://registry.hub.docker.com'
def dockerHubCreds = 'docker-hub-login'
def dockerRepo = 'magneticio'
You can’t perform that action at this time.