Skip to content

Instantly share code, notes, and snippets.

@ChrisMcKee
ChrisMcKee / docker-destroy-all.sh
Created February 1, 2018 13:20 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@ChrisMcKee
ChrisMcKee / install_elasticsearch_on_ubuntu.sh
Created February 13, 2017 22:38 — forked from fxp/install_elasticsearch_on_ubuntu.sh
Install Elasticsearch on Ubuntu
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo apt-get install apt-transport-https
echo "deb https://artifacts.elastic.co/packages/5.x-prerelease/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list
sudo apt-get update
sudo apt-get install elasticsearch
service elasticsearch start
# if service start failed, try to modify -Xms lower like -Xms1g in /etc/elasticsearch/jvm.options
@ChrisMcKee
ChrisMcKee / Client.cs
Created March 29, 2016 15:18 — forked from prabirshrestha/Client.cs
Batch Request in nancy
using System.Net.Http;
class Program
{
static void Main(string[] args)
{
var client = new HttpClient();
var batchRequest = new HttpRequestMessage(HttpMethod.Post, "http://localhost:3440/api/batch");
#!/bin/bash
echo '
###
# Welcome to graphite creator
###
!!!
! THIS WILL REMOVE /var/www - MAKE SURE YOU WANT TO DO THIS!
!!!
# Add this to the YAML section:
ansible_ssh_port: 1234
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
#! /bin/sh
##
# Generated by Chef
# <%= Time.now %>
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
@ChrisMcKee
ChrisMcKee / es.sh
Created January 28, 2014 11:48 — forked from nodesocket/es.sh
cd ~
sudo yum -y install java-1.7.0-openjdk
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.1.zip
unzip elasticsearch-0.90.1.zip
rm -rf elasticsearch-0.90.1.zip
mv elasticsearch-0.90.1 elasticsearch
sudo mv elasticsearch /usr/local/share
cd /usr/local/share