Skip to content

Instantly share code, notes, and snippets.

Luke Chavers vmadman

Block or report user

Report or block vmadman

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
vmadman / packer-config.json
Last active Aug 1, 2017
Packer log: Error deleting VM
View packer-config.json
"variables" : {
"source_name" : "centos-7.3-x86_64-raw-r1",
"headless" : "false",
"http_proxy" : "{{env `http_proxy`}}",
"https_proxy" : "{{env `https_proxy`}}",
"memory" : "2048",
"metadata" : "packer/floppy/dummy_metadata.json",
"name" : "centos-7.3",
"no_proxy" : "{{env `no_proxy`}}",
vmadman / create-concrete.lua
Created Mar 26, 2017
Factorio: Create Concrete Area (10,000 tiles)
View create-concrete.lua
/c for i=-100,100 do for j=-100,100 do game.player.surface.set_tiles({{name="concrete", position={game.player.position.x+i, game.player.position.y+j}}}) end end
vmadman / issue_comments_suggestion.bmml
Created Feb 22, 2015
Balsamiq Mockup for Issue Detail Proposal
View issue_comments_suggestion.bmml
<mockup version="1.0" skin="sketch" fontFace="Balsamiq Sans" measuredW="1322" measuredH="912" mockupW="861" mockupH="861">
<control controlID="0" controlTypeID="com.balsamiq.mockups::Label" x="531" y="73" w="-1" h="-1" measuredW="520" measuredH="48" zOrder="3" locked="false" isInGroup="-1">
vmadman / tmpSugarFix.ts
Created Dec 19, 2013
This is *my* current temporary fix to get SugarJS's static method additions working in typescript.
View tmpSugarFix.ts
/// <reference path="../path/to/sugar.d.ts" />
* Usage Examples:
* sgObject.isArray([1]); // -> true
declare var sgObject:ObjectStatic;
declare var sgNumber:NumberStatic;
declare var sgDate:DateStatic;
vmadman / logio.rb
Last active Dec 28, 2015 output plugin for Logstash -- logstash / lib / logstash / outputs / logio.rb
View logio.rb
require "logstash/outputs/base"
require "logstash/namespace"
require "socket"
# Output
# Sends events to a server over TCP.
# Plugin is fault tolerant. If the plugin is unable to connect to the server,
# or writes to a broken socket, it will attempt to reconnect indefinitely.
vmadman / logstash-rsyslog-conf
Created Apr 27, 2013
This is the UDP output settings I added to /etc/rsyslog.conf so that it would output system events to my LogStash shipper agent. (shipper is the name I took from the LogStash docs, but basically its the "client", not the "server", as loosely as those words apply to logstash)
View logstash-rsyslog-conf
# Send syslog to LogStash
*.* @@
vmadman / apache-virtualhost-log-cfg
Created Apr 27, 2013
This is just the log settings I put on each of our virtual hosts so that they pipe logs to LogStash via a UDP proxy. In my setup the error UDP port increments for each virtual host, which allows my LogStash shipper to apply hostnames.
View apache-virtualhost-log-cfg
# Error logging to LogStash via UDP client pipe
ErrorLog "||/usr/local/bin/ 5002"
LogLevel warn
# Access logging to LogStash via UDP client pipe
CustomLog "||/usr/local/bin/ 5001" ls_apache_json
vmadman / apache-json-log-format
Created Apr 27, 2013
An apache log format that allow access logs (but not error logs) to be output in JSON format. I found this here: -- but modified it for my purposes a good bit.
View apache-json-log-format
# Access Logs
LogFormat "{ \
\"@vips\":[\"%v\"], \
\"@source\":\"%v%U%q\", \
\"@source_host\": \"%v\", \
\"@source_path\": \"%f\", \
\"@tags\":[\"Apache\",\"Access\"], \
\"@message\": \"%h %l %u %t \\\"%r\\\" %>s %b\", \
\"@fields\": { \
\"timestamp\": \"%{%Y-%m-%dT%H:%M:%S%z}t\", \
vmadman / apache-perl-udp-pipe
Created Apr 27, 2013
A PERL UDP client. This client serves (in my usage) as a pipe target for apache logs. After reception, logs are forwarded to logstash. I found this at:
View apache-perl-udp-pipe
use IO::Socket::INET;
my $host = $ARGV[0];
my $port = $ARGV[1];
# flush after every write
$| = 1;
my ($socket,$logdata);
vmadman / logstash-supervisord
Created Apr 27, 2013
An example SupervisorD configuration for all three logstash components. Some of it might look obvious, but it took a ton of tweaking to figure it out. (but I might just be dumb)
View logstash-supervisord
command=java -jar /usr/local/logstash/bin/logstash-1.1.9-monolithic.jar agent --config /usr/local/logstash/conf/shipper.conf --log /usr/local/logstash/log/shipper.log
You can’t perform that action at this time.