Skip to content

Instantly share code, notes, and snippets.

View jacques's full-sized avatar
🎯
Focusing

Jacques Marneweck jacques

🎯
Focusing
View GitHub Profile
anonymous
anonymous / config.json
Created November 27, 2015 08:43
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
# Author: Aram Grigorian <aram@opendns.com>
# https://github.com/aramg
# https://github.com/opendns
#
# By default, nginx will close upstream connections after every request.
# The upstream-keepalive module tries to remedy this by keeping a certain minimum number of
# persistent connections open at all times to upstreams. These connections are re-used for
# all requests, regardless of downstream connection source. There are options available
# for load balacing clients to the same upstreams more consistently.
# This is all designed around the reverse proxy case, which is nginxs main purpose.
@chrismdp
chrismdp / s3.sh
Last active March 5, 2024 12:57
Uploading to S3 in 18 lines of Shell (used to upload builds for http://soltrader.net)
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine
# This is how I upload my new Sol Trader builds (http://soltrader.net)
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash
S3KEY="my aws key"
S3SECRET="my aws secret" # pass these in
function putS3
{
path=$1
@mariocesar
mariocesar / README.md
Last active August 29, 2015 14:04
Ubuntu Server + Nginx + Dropbox + uwsgi Apps

Install

Create a websites user.

sudo adduser --disabled-password --home /src/websites websites

Login and install dropbox.

sudo -s su - websites

@mattconnolly
mattconnolly / gist:6444557
Created September 5, 2013 00:27
Using zonecfg to set qemu_extra_opts in SmartOS
# zonecfg -z <uuid>
# add attr
# set name=qemu-extra-opts
# set type=string
# set value="LXNtcCBjcHVzPTEsY29yZXM9NCx0aHJlYWRzPTI="
# end
# commit
# exit
Then reboot the machine. The value is the base64 encoded string that will be added to the qemu-kvm options. The above is "-smp cpus=1,cores=4,threads=2", which plays nice with Windows which for some stupid reason only supports 2 cpus.
@chendo
chendo / gist:5361523
Created April 11, 2013 07:49
Slap this in ~/.ssh/config to route github.com access over SSH via another server to get around routing issues.
Host github.com
ProxyCommand ssh -qxT <ssh server you have access to> nc %h %p
"Good hardware costs money, and your time has value. The ditches on either
side of the road through the land of hardware are steep and home to
manifold ferocious beasts. Stray from this golden path at your peril."
-- Keith Wesolowski
http://www.listbox.com/member/archive/184463/2013/02/sort/time_rev/page/1/entry/0:156/20130218134633:82C0ABBC-79FB-11E2-B214-A90A0365DAE4/
@kigster
kigster / gist:4751844
Last active August 1, 2020 23:46
PostgreSQL config file for high performance writes on Joyent Cloud, used by Wanelo.com in production (4K commits/second on a dedicated 80GB instance).
max_connections = 1500 # (change requires restart)
shared_buffers = 12000MB # min 128kB, based on 80GB RAM DB
temp_buffers = 8MB # min 800kB
work_mem = 64MB # min 64kB
maintenance_work_mem = 1500MB # min 1MB
wal_level = hot_standby # minimal, archive, or hot_standby
checkpoint_segments = 256 # in logfile segments, min 1, 16MB each
checkpoint_completion_target = 0.9 # checkpoint target duration, 0.0 - 1.0
max_wal_senders = 6 # max number of walsender processes
@matthiasg
matthiasg / carbon-cache.sh
Last active June 4, 2018 23:25
getting graphite to run under a smartos base zone
#!/bin/bash
# Simple Ad Hoc Carbon Cache Service
#
# put in /opt/custom/share/svc/carbon-cache.sh
set -o xtrace
. /lib/svc/share/smf_include.sh
cd /
PATH=/usr/sbin:/usr/bin:/opt/custom/bin:/opt/custom/sbin; export PATH
@elijah
elijah / consume_json.rb
Created September 29, 2012 22:38 — forked from andreacampi/consume_json.rb
cookbooks/consume_json/libraries/consume_json.rb
class Chef
module Mixin
module ConsumeJson
def consume_json(url)
Chef::Log.debug "consume_json: requesting url: #{url}"
info = nil
fetch(url) do |data|
info = JSON.parse(data)
Chef::Log.debug "consume_json: parsed: #{info.inspect}"