Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexander lxcodes

View GitHub Profile
View haproxy_maintenance.conf
#
# Proof of concept for a HAProxy maintenance mode
#
#
# Control the maintenance page during runtime using the stats socket:
#
# To put the whole site in maintenance mode (for all IPs):
# > add acl #0 0.0.0.0/0
#
# To exclude your own ip, so you are able to test things out:
@lxcodes
lxcodes / gist:915baaf2f31355d3a218
Last active Sep 10, 2015 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan Developer Preview 2
View gist:915baaf2f31355d3a218

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@lxcodes
lxcodes / CA Province - Territory List
Last active Aug 29, 2015 — forked from tvpmb/US State List
State Lists In JSON
View CA Province - Territory List
[
{ value: "CA-AB", label: "Alberta" },
{ value: "CA-BC", label: "British Columbia" },
{ value: "CA-MB", label: "Manitoba" },
{ value: "CA-NB", label: "New Brunswick" },
{ value: "CA-NL", label: "Newfoundland and Labrador" },
{ value: "CA-NS", label: "Nova Scotia" },
{ value: "CA-ON", label: "Ontario" },
{ value: "CA-PE", label: "Prince Edward Island" },
{ value: "CA-QC", label: "Quebec" },
View slack_nagios.sh
#!/bin/bash
# This script is used by Icinga to post alerts into a Slack channel
# using the Incoming WebHooks integration. Create the channel, botname
# and integration first and then add this notification script in your
# Icinga configuration.
#
# All variables that start with NAGIOS_ are provided by Icinga as
# environment variables when an notification is generated.
# A list of the env variables is available here:
View ember-select.js
var get = Ember.get, set = Ember.set, computed = Ember.computed, defineProperty = Ember.defineProperty, observer = Ember.observer;
Ember.Select.reopen({
optionDisabledPath: null
});
Ember.SelectOption.reopen({
attributeBindings: ['disabled'],
init: function() {
View clean.py
#!/usr/bin/python
import argparse
import re
import logging
import os
import sys
if os.name == "nt":
import pbs as sh
@lxcodes
lxcodes / Slim HTML5 Boilerplate Conditional Comments
Created Mar 3, 2012 — forked from helloluis/Slim HTML5 Boilerplate Conditional Comments
How to get HTML5 Boilerplate-style Conditional Comments Working in Slim
View Slim HTML5 Boilerplate Conditional Comments
doctype html
/[if lt IE 7]
| <html class="ie6">
/[if IE 7]
| <html class="ie7">
/[if IE 8]
| <html class="ie8">
/[if IE 9]
| <html class="ie9">
| <!--[if (gte IE 9)|!(IE)]<!--> <html> <!--<![endif]-->
You can’t perform that action at this time.