Skip to content

Instantly share code, notes, and snippets.

@bruienne
bruienne / vmfusion.sh
Last active December 14, 2015 21:49
Configuration script for use with veewee to automatically install the Linux guest tools.
#!/bin/bash
#Mount and install the VMware Fusion guest tools using default settings
kernel=`uname -s`
if [ "${kernel}" == "Linux" ]; then veewee_user="veewee"; elif [ "${kernel}" == "Darwin" ]; then veewee_user="vagrant"; fi
echo "**** Our kernel is ${kernel} and our user is ${veewee_user}."
if [ $kernel == "Linux" ]; then
#Set Linux-specific paths and ISO filename
@kgorskowski
kgorskowski / coreos-ecs-agent-cloudformation.template
Last active December 31, 2017 14:35
AWS CloudFormation Template for CoreOS stable including AWS ECS Agent. Provide ECS - Cluster and IAM Role, otherwise the ECS service will not work
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "CoreOS on EC2: http://coreos.com/docs/running-coreos/cloud-providers/ec2/",
"Mappings" : {
"RegionMap" : {
"eu-central-1" : {
"AMI" : "ami-487d4d55"
},
@richp10
richp10 / gist:1c367d3c67aec762788e
Created May 10, 2014 10:19
Secure iptables configuration for coreos ??
// This systemd runs iptables-restore on boot:
[Unit]
Description=Packet Filtering Framework
DefaultDependencies=no
After=systemd-sysctl.service
Before=sysinit.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/iptables-restore /opt/docker/scripts/iptables/iptables.rules
@finack
finack / application.rb
Created March 17, 2012 06:18
Example Chef Deploy Revision for Rails 3+
app = node[:rails][:app]
rails_base app[:name] do
ruby_ver app[:ruby_ver]
gemset app[:gemset]
end
%w{config log pids cached-copy bundle system}.each do |dir|
directory "#{app[:app_root]}/shared/#{dir}" do
owner app[:deploy_user]
@josephholsten
josephholsten / json-log.conf
Created January 22, 2015 01:12
Complete JSON nginx log_format
# json-log.conf - log all useful nginx variables in json formatted log
# for details about these variables, see http://nginx.org/en/docs/http/ngx_http_core_module.html#variables
log_format json-log '{'
# $arg_*
# $args
# $binary_remote_addr
'"body_bytes_sent":"$body_bytes_sent",'
'"bytes_sent":"$bytes_sent",'
'"connection":"$connection",'
# $connection_requests
@markjaquith
markjaquith / nginx.conf
Last active December 25, 2022 15:55
My WordPress Nginx setup
upstream phpfpm {
server unix:/var/run/php5-fpm.sock;
}
upstream hhvm {
server unix:/var/run/hhvm/hhvm.sock;
}
# SSL
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
@grantr
grantr / gist:1105416
Created July 25, 2011 22:31
Chef mysql master/slave recipes
## mysql::master
ruby_block "store_mysql_master_status" do
block do
node.set[:mysql][:master] = true
m = Mysql.new("localhost", "root", node[:mysql][:server_root_password])
m.query("show master status") do |row|
row.each_hash do |h|
node.set[:mysql][:master_file] = h['File']
node.set[:mysql][:master_position] = h['Position']
end
@fabrizioc1
fabrizioc1 / akamai_debug_headers.txt
Last active May 24, 2023 08:23
Akamai debug headers
Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no
@mplacona
mplacona / gist:614ffdacc7da223f8a6121cd4b7a2eee
Last active October 27, 2023 08:22 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@ibeex
ibeex / foo.log
Created August 4, 2012 13:46
Flask logging example
A warning occurred (42 apples)
An error occurred