Skip to content

Instantly share code, notes, and snippets.

View StephenKing's full-sized avatar

Steffen Gebert StephenKing

View GitHub Profile
@StephenKing
StephenKing / sysadmin.rb
Created December 27, 2011 13:00
Users cookbook with enforcement to choose password upon first login
#
# Cookbook Name:: users
# Recipe:: sysadmins
#
# Copyright 2009-2011, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@StephenKing
StephenKing / gist:3312956
Created August 10, 2012 09:33
Chef application_java log
[Fri, 10 Aug 2012 11:26:39 +0200] INFO: *** Chef 0.10.8 ***
[Fri, 10 Aug 2012 11:26:39 +0200] DEBUG: Building node object for typo3-chef-repo.dev
[Fri, 10 Aug 2012 11:26:39 +0200] DEBUG: Extracting run list from JSON attributes provided on command line
[Fri, 10 Aug 2012 11:26:39 +0200] INFO: Setting the run_list to ["recipe[minitest-handler]", "role[debian]", "role[vagrant]", "role[gitblit]"] from JSON
[Fri, 10 Aug 2012 11:26:39 +0200] DEBUG: Applying attributes from json file
[Fri, 10 Aug 2012 11:26:39 +0200] DEBUG: Platform is debian version 6.0.5
[Fri, 10 Aug 2012 11:26:39 +0200] INFO: Run List is [recipe[minitest-handler], role[debian], role[vagrant], role[gitblit]]
[Fri, 10 Aug 2012 11:26:39 +0200] INFO: Run List expands to [minitest-handler, apt, chef_handler, base, locales, ntp, openssh, git, rsync, screen, postfix, postfix::aliases, java, tomcat, ant, application, gitblit]
[Fri, 10 Aug 2012 11:26:39 +0200] INFO: Starting Chef Run for typo3-chef-repo.dev
[Fri, 10 Aug 2012 11:26:39 +0200] INFO: Running
@StephenKing
StephenKing / gist:3782518
Created September 25, 2012 15:13
Gerrit authentication
<?php
class AccountSync {
protected $apiKey;
protected $pdo;
protected $accountIds = array();
protected $statements = array();
public function __construct($apiKey) {
$this->apiKey = $apiKey;
@StephenKing
StephenKing / gist:3787171
Created September 26, 2012 10:12
Gerrit thread dump
Full thread dump OpenJDK 64-Bit Server VM (14.0-b16 mixed mode):
"HTTP-25" prio=10 tid=0x00007f76d06d1000 nid=0x3b0c waiting on condition [0x00007f76cfdfc000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00007f77843eea38> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2081)
at java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:370)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:479)
<VirtualHost *:443>
ServerName review.typo3.org
ServerAlias
DocumentRoot /var/www
SSLEngine on
SSLProxyEngine on
SSLCertificateFile /etc/ssl_certs/....crt
SSLCertificateKeyFile /etc/ssl_certs/....key
@StephenKing
StephenKing / Vagrantfile
Last active December 17, 2015 09:19
My Vagrantfile
boxes = [
{
:name => :default,
:ip => '192.168.156.130',
:run_list => '',
# :http_port => '8080',
# :gui => true,
# :memory => 2048,
# :cpus => 4,
},

metadata.rb

name              'my_postgresql'
license           'Apache 2.0'
version           '1.0.0'
 
depends           'postgresql'
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://piwik.example.org/" : "http://piwik.example.org/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 2);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
@StephenKing
StephenKing / replication.config
Last active August 29, 2015 13:57
Gerrit task list
[remote "git"]
url = git@review.typo3.org:/var/git/repositories/${name}.git
authGroup = Git Mirror
mirror = true
threads = 8
timeout = 120
[remote "forge"]
url = git@forge.typo3.org:repositories/${name}.git
push = +refs/heads/*:refs/heads/*
push = +refs/tags/*:refs/tags/*
@StephenKing
StephenKing / tightvncserver.conf
Created May 21, 2014 13:36
tightvncserver service
# /etc/init/tightvncserver.conf
# tightvncserver for ubuntu user
description "Starts TightVNC server for ubuntu user"
author "Steffen"
start on (filesystem
and started avahi-daemon
and (started dbus or runlevel [2345])