Skip to content

Instantly share code, notes, and snippets.

@ChrisMcKee
ChrisMcKee / updatehaproxy.sh
Last active August 29, 2015 14:03
Upgrade Src Install of HAProxy
#!/bin/bash
### VARIABLES ###
PRE_PACK="openssl-devel pcre-devel make gcc"
VER="1.5.1"
# Setup Colours
black='\E[30;40m'
red='\E[31;40m'
@ChrisMcKee
ChrisMcKee / installnginx.sh
Last active August 29, 2015 14:03
Install NGINX on CENTOS from source
#!/bin/bash
### VARIABLES ###
PRE_PACK="gcc gcc-c++ make pcre-devel zlib-devel unzip wget htop"
OPT_PACK="openssl-devel"
VER="1.6.2"
USER="nginx"
GROUP="nginx"
INSTALL_DIR="/etc/nginx"
PROG_NAME="nginx"
# Add this to the YAML section:
ansible_ssh_port: 1234
PUT /blurays
{
"settings": {
"analysis": {
"filter": {
"nGram_filter": {
"type": "nGram",
"min_gram": 2,
"max_gram": 20,
"token_chars": [
@ChrisMcKee
ChrisMcKee / Channon.sh
Created November 17, 2014 15:29
Channon
#!/usr/bin/env bash
NOW=$( date '+%Y-%m-%d_%H-%M-%S' )
FILE="$NOW.txt"
touch ~/$FILE
<#@ template language="C#" hostspecific="true" debug="True" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Data" #>
<#@ assembly name="System.Xml" #>
<#@ assembly name="Microsoft.SqlServer.Smo" #>
<#@ assembly name="Microsoft.SqlServer.ConnectionInfo" #>
<#@ assembly name="Microsoft.SqlServer.Management.Sdk.Sfc" #>
<#@ import namespace="System" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="System.Linq" #>
#!/bin/bash
echo '
###
# Welcome to graphite creator
###
!!!
! THIS WILL REMOVE /var/www - MAKE SURE YOU WANT TO DO THIS!
!!!
using System;
using System.Collections.Generic;
using Tweetinvi;
using Tweetinvi.Core.Interfaces;
//https://dev.twitter.com/rest/reference/get/favorites/list
namespace Twatter
{
internal class Program
{
private static readonly List<ITweet> tweets = new List<ITweet>();
@ChrisMcKee
ChrisMcKee / rakefile.rb
Created April 25, 2011 21:32 — forked from jonhilt/rakefile.rb
A simple Rake build script example
require 'albacore'
require 'fileutils'
PROJECT_NAME = "Your Project Here"
DOT_NET_PATH = "C:/Windows/Microsoft.NET/Framework/v4.0.30319/"
NUNIT_PATH = "Tools/nunit/"
MSPEC_PATH = "Tools/mspec/"
PROJECT_CONFIG = (ENV['PROJECT_CONFIG'] == nil) ? "Debug" : ENV['PROJECT_CONFIG']
COMPANY_NAME = "Your Company Here"
BUILD_NUMBER = (ENV['BUILD_NUMBER'] == nil) ? "1.0.0.0" : ENV['BUILD_NUMBER']
require 'rake'
require 'albacore'
build_dir = "../build"
bin_dir = "#{build_dir}/bin"
src_dir = "../src"
solution = "#{src_dir}/Example.sln"
release_dir = "#{build_dir}/release"
package_dir = "#{build_dir}/package"