Skip to content

Instantly share code, notes, and snippets.

Mitchell Anicas thisismitch

Block or report user

Report or block thisismitch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am thisismitch on github.
  • I am thisismitch (https://keybase.io/thisismitch) on keybase.
  • I have a public key ASC7O1Zoquc9lBjggragpOmE17cD3sHw00DU5salLEZsQQo

To claim this, I am signing this object:

@thisismitch
thisismitch / hello.js
Last active Mar 3, 2016
Node.js hello world
View hello.js
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(8080, 'APP_PRIVATE_IP_ADDRESS');
console.log('Server running at http://APP_PRIVATE_IP_ADDRESS:8080/');
@thisismitch
thisismitch / dropbox
Last active Mar 26, 2018 — forked from kbrnsr/dropbox
Dropbox systemd and init files (CentOS 7)
View dropbox
#!/bin/sh
# To configure, add line with DROPBOX_USERS="user1 user2" to /etc/sysconfig/dropbox
# Probably should use a dropbox group in /etc/groups instead.
# Source function library.
. /etc/rc.d/init.d/functions
prog=dropboxd
lockfile=${LOCKFILE-/var/lock/subsys/$prog}
@thisismitch
thisismitch / dropbox
Last active Mar 26, 2018 — forked from migrs/dropbox
/etc/init.d/dropbox
View dropbox
#!/bin/sh
### BEGIN INIT INFO
# Provides: dropbox
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: false
# Short-Description: dropbox service
### END INIT INFO
@thisismitch
thisismitch / topbeat.yml
Created Feb 1, 2016
Topbeat configuration with comments removed
View topbeat.yml
input:
period: 10
procs: [".*"]
stats:
system: true
proc: true
filesystem: true
output:
@thisismitch
thisismitch / haproxy.cfg
Last active Mar 29, 2019
Let's Encrypt Auto-Renewal script for HAProxy
View haproxy.cfg
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
maxconn 2048
@thisismitch
thisismitch / le-renew-webroot
Last active Dec 19, 2018
Let's Encrypt Auto-Renewal using the Webroot Plugin (Nginx)
View le-renew-webroot
#!/bin/bash
web_service='nginx'
config_file="/usr/local/etc/le-renew-webroot.ini"
le_path='/opt/letsencrypt'
exp_limit=30;
if [ ! -f $config_file ]; then
echo "[ERROR] config file does not exist: $config_file"
@thisismitch
thisismitch / filebeat-index-template.json
Last active Oct 7, 2018
Filebeat configuration with comments removed
View filebeat-index-template.json
{
"mappings": {
"_default_": {
"_all": {
"enabled": true,
"norms": {
"enabled": false
}
},
"dynamic_templates": [
View corridors_of_code.rb
# Chrono Trigger Soundtrack - Corridors of Time
# plug this into http://sonic-pi.net/
# still needs synth pads
# global config
use_bpm 112
def play_legato_note(note_value, duration)
release_duration = duration
@thisismitch
thisismitch / floatip-ocf
Created Oct 16, 2015
FloatIP OCF Agent (for Pacemaker)
View floatip-ocf
#!/bin/bash
param=$1
export DO_TOKEN=$OCF_RESKEY_do_token
IP=$OCF_RESKEY_floating_ip
ID=$(curl -s http://169.254.169.254/metadata/v1/id)
HAS_FLOATING_IP=`curl -s http://169.254.169.254/metadata/v1/floating_ip/ipv4/active`
meta_data() {
You can’t perform that action at this time.