Skip to content

Instantly share code, notes, and snippets.

Living the dream

Jeffrey Clark h0tw1r3

Living the dream
View GitHub Profile
lantian / install.php
Last active Dec 19, 2015
Phalcon createTable
View install.php
foreach ($this->_getModels() as $model) {
$columns = array();
$primaries = array();
foreach ($model['columns'] as $columnName => $column) {
if (isset($column['is_primary']) && $column['is_primary']) {
$primaries = $columnName;
jasonhancock / puppet apache log analyzer
Created Aug 23, 2012
Analyze puppet's apache logs.
View puppet apache log analyzer
use strict;
use warnings;
use Data::Dumper;
my $file = $ARGV[0] or die('Must pass an apache access logfile');
open IN, "<$file" or die("Can't open $file");
andrewkroh / fstab.pp
Created Aug 9, 2014
Configuring /etc/fstab with Puppet Augeas
View fstab.pp
augeas{ '/etc/fstab - nosuid on /sys':
context => "/files/etc/fstab",
changes => [
"ins opt after /files/etc/fstab/*[file = '/sys']/opt[last()]",
"set *[file = '/sys']/opt[last()] nosuid",
onlyif => "match *[file = '/sys']/opt[. = 'nosuid'] size == 0",
augeas{ '/etc/fstab - acl on /sys':
View manifests__site.pp
node demo {
nagios::host::service { 'ping':
check_command => 'check_ping',
rday / gist:3504674
Created Aug 28, 2012
Abstract wrapper to allow connection pools
View gist:3504674
type InitFunction func() (interface{}, error)
type ConnectionPoolWrapper struct {
size int
conn chan interface{}
Call the init function size times. If the init function fails during any call, then
the creation of the pool is considered a failure.
ebirn / runkexec
Last active Nov 15, 2017
kexec latest kernel on Centos 6
View runkexec
VERSION=$(ls -t1 /boot/vmlinuz-* | cut -f 1 -d '-' --complement | head -1)
joshenders / sabnzbdplus.default
Last active Dec 8, 2017
Installing sabnzbdplus on Debian Wheezy from source
View sabnzbdplus.default
# This file is sourced by /etc/init.d/sabnzbdplus
# When SABnzbd+ is started using the init script, the
# --daemon option is always used, and the program is
# started under the account of $USER, as set below.
# Each setting is marked either "required" or "optional";
# leaving any required setting unconfigured will cause
# the service to not start.
zorab47 / offline_template.rb
Created Nov 22, 2011
Offline Template for Rails 2.3.x
View offline_template.rb
# Public: Template to render views outside the context of a controller.
# Useful for rendering Rails 2.3.x views in rake tasks or background jobs when a
# controller is unavailable.
# Examples
# template =
# template.render("users/index", :layout => false, :locals => { :users => users })
lukespragg / sign4j.c
Last active Aug 2, 2018
Sign4j for Linux
View sign4j.c
sign4j.c: a simple utility to sign executables created by Launch4j
Copyright (c) 2012 Grzegorz Kowal
Modified for Linux by Luke Spragg (Wulfspider), Dalton Pelc (Olloth), Contex, and raphfrk
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
dalenoe /
Last active Oct 14, 2018 — forked from stevejenkins/
Import and use SSL certificates (including Let's Encrypt) with the Ubiquiti UniFi Controller on Unix/Linux Systems
#!/usr/bin/env bash
# UniFi Controller SSL Certificate Import Script for Unix/Linux Systems
# by Steve Jenkins <>
# Incorporates ideas from
# Version 2.2
# Last Updated June 26, 2016