Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View garrettwilkin's full-sized avatar

Garrett Wilkin garrettwilkin

View GitHub Profile
@garrettwilkin
garrettwilkin / upload_memcache_stats.py
Created February 2, 2018 16:37 — forked from andrewgross/upload_memcache_stats.py
Python Script to Upload Memcache Metrics to CloudWatch
import sys, time, subprocess, socket, telnetlib
from datetime import datetime
from collections import defaultdict
from boto.ec2.cloudwatch import CloudWatchConnection
MAPPINGS = {
# Memcached name: (AWS Name, AWS Metric Type, Calculation Method)
'uptime': ('Uptime', 'Count', 'gauge'),
gw@drogon:~/Downloads$ sudo ./vpnsetup.sh
[sudo] password for gw:
Installing Cisco AnyConnect Secure Mobility Client...
Extracting installation files to /tmp/vpn.19PqnG/vpninst897227991.tgz...
Unarchiving installation files to /tmp/vpn.19PqnG...
Starting Cisco AnyConnect Secure Mobility Client Agent...
Failed to start vpnagentd.service: Unit vpnagentd.service not found.
@garrettwilkin
garrettwilkin / webex-ubuntu.md
Last active September 20, 2017 21:21 — forked from mshkrebtan/webex-ubuntu.md
Run Cisco Webex on 64-bit Ubuntu 16.04

Run Cisco Webex on 64-bit Ubuntu 16.04

With Audio and Screen Sharing Enabled

Enable support for 32-bit executables

Add the i386 architecture to the list of dpkg architectures :

sudo dpkg --add-architecture i386
@garrettwilkin
garrettwilkin / gist:f2be2ee166ebf5da6b27e5d481b1698b
Created August 30, 2017 15:30
Shruggie for GitHub comments
¯\\\_(ツ)\_/¯
#!/bin/bash
options=('find' 'delete')
PS3='state your wish: '
echo -e "\nfind/delete corrupt whisper-files"
select opt in "${options[@]}"; do
case $REPLY in
[12] ) option=$opt; break;;
* ) exit;;
@garrettwilkin
garrettwilkin / gist:8228461
Created January 2, 2014 22:37
Trying to access the result object to write my response to the client.
I have a server that uses this director setup:
function posts() {
var type = 'posts';
analytics(type,this);
}
function sections() {
var type = 'sections';
analytics(type,this);
@garrettwilkin
garrettwilkin / example
Created December 20, 2013 20:40
Exceptions via assert.equal
$ node
> var assert = require('assert');
undefined
> var i = 10;
undefined
> var j = 11;
undefined
> assert.equal(i,j)
AssertionError: 10 == 11
at repl:1:9
@garrettwilkin
garrettwilkin / GO AWAY git file!
Created November 11, 2013 21:28
GAAAAHHHH!!!!
» ~/Code/Parsely/web (web+apidocs) [master]
$ git checkout -- p2/index.php
» ~/Code/Parsely/web (web+apidocs) [master]
$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
# (use "git push" to publish your local commits)
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
parselyCallback815({
data: [
{
tags: null,
url: "http://www.factmag.com/2013/11/02/fact-writers-pick-their-top-10-albums-of-all-time/",
title: "FACT Writers pick their top 10 albums of all time",
section: "Features",
author: "joseph",
thumb_url_medium: "http://c0001566.cdn1.cloudfiles.rackspacecloud.com/medium_dc0930ae20c72599dab0af096611dbed85bfa2c2.jpg",
image_url: "http://factmag-images.s3.amazonaws.com/wp-content/uploads/2013/11/FACT-writers-favourite-albums-of-all-time-11.3.2013-75x50.jpg",
<meta name="parsely-page" content="{&quot;title&quot;: &quot;Morrissey hospitalised with concussion after apparent car accident&quot;, &quot;link&quot;: &quot;http://www.factmag.com/2013/11/04/morrissey-hospitalised-with-concussion-after-apparent-car-accident/&quot;, &quot;section&quot;: &quot;News&quot;, &quot;image_url&quot;: &quot;http://factmag-images.s3.amazonaws.com/wp-content/uploads/2013/11/Morrissey041113-75x50.jpg&quot;,&quot;type&quot;: &quot;post&quot;,&quot;post_id&quot;: &quot;189193&quot;, &quot;author&quot;: &quot;joseph&quot;, &quot;pub_date&quot;: &quot;2013-11-04T08:43:34Z&quot;}">