Skip to content

Instantly share code, notes, and snippets.

package main
import (
"fmt"
"log"
"os"
"net/http"
"net/http/httputil"
"net/url"
"time"
centos-6-V2O 170620
centos-7-20170620
coreos-alpha-1465-0-0-v20170706
coreos-beta-1437-3-0-2017O630
coreos-stable-1409-6-O-V2O170706
cos-beta-60-9592-31-0
cos-dew-61-97.15-0-0
cos-stable-58-93.34-74-0
cos-stable-59-94.60-64-0
#!/bin/bash
set -uxe
apt-get update && apt-get install -qy software-properties-common
apt-add-repository multiverse && apt-get update
apt-get install -qy vim git python python-dev python-pip libffi-dev python-paramiko python-jinja2 python-yaml python-pkg-resources python-crypto libssl-dev libyaml-dev
pip install --upgrade ansible==2.0.2.0
pip install --upgrade clc-ansible-module==1.1.16
#!/usr/bin/env python
import os
import json
import bottle
import bottle_cassandra_driver as cass
from bottle import request, response, get, post, put, delete
app = application = bottle.Bottle()
application = bottle.default_app()
#!/usr/bin/env python
import os
import threading
import time
import socket
import SocketServer
import collections
import sys
import json
#!/usr/bin/env python
import sys
import os
import pickle
import logging
import simplejson
import getopt
import inspect
import types
#!/usr/bin/env python
"""
monitor a directory:
- id files via genpuid (musicdns)
- update ID3 tags and rewrite filename
REQUIREMENTS:
1) signup for an account and API key here:
https://secure.musicip.com/dns/index.jsp
@ack
ack / mesosphere-bootstrap.bash
Created November 6, 2015 04:02
super script to install mesosphere master or slave on ubuntu
#!/bin/bash
set -e
function init {
[[ ! -f /tmp/updated ]] && apt-get update -y && touch /tmp/updated
myip=$(ifconfig eth0 | awk '/inet addr/ {split ($2,A,":"); print A[2]}')
}
#!/usr/bin/env bash
#
# Functions
ok() {
echo -e '\e[32m'$1'\e[m';
}
die() {
echo -e '\e[1;31m'$1'\e[m'; exit 1;
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <string.h>
#include <unistd.h>
void print_help(char *prog_name) {
printf("Usage: %s [-n] DEVNAME COMMAND\n", prog_name);