Skip to content

Instantly share code, notes, and snippets.

View dalehamel's full-sized avatar

Dale Hamel dalehamel

View GitHub Profile
config_files = Dir.glob("#{ENV['HOME']}/Library/Application Support/Viscosity/OpenVPN/*/config.conf")
config_files.each do |file|
certificate_files = ['ca', 'cert', 'key', 'tls-auth']
config_dir = File.dirname(file)
connection_name = nil
new_config = []
File.open(file).each do |line|
if line.start_with?('#viscosity name')
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.14.0-rc2 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
#!/bin/bash
lddwalk ()
{
files=`ldd $1 | awk '{print $3'} | grep -v "^$"`
for file in $files; do
echo $file
lddwalk $file
done
}
@dalehamel
dalehamel / iocheck.sh
Created April 21, 2014 05:24
Zero dependency linux IO usage checker
#!/bin/sh
INTERVAL=10
PARTITION=mmcblk0p2
DEVICE=mmcblk0
#PARTITION=sda2
#DEVICE=sda
S_SIZE=`cat /sys/block/$DEVICE/queue/hw_sector_size`
/*
Tool for computing partman partition sizes
Based on partman docs at https://wikitech.wikimedia.org/wiki/PartManAuto
To compile: gcc partman-check.c -o partman-check
To run: ./partman-check
*/
#include <stddef.h>
Operating system: Linux
0.0.0 Linux 3.10.20 #1 PREEMPT Sun Apr 27 15:35:54 EDT 2014 armv6l
CPU: arm
ARMv1 ARM ARM1176 features: swp,half,thumb,fastmult,vfpv2,edsp,java,tls
1 CPU
Crash reason: SIGSEGV
Crash address: 0x0
Thread 26 (crashed)
@dalehamel
dalehamel / gist:f6d4c0da355bb6eb368b
Last active August 29, 2015 14:01
Beta test for 0.4.2
Please download the following image:
http://updater.rasplex.com/beta/rasplex-RP-0.5.0.img.gz
We just need a run-through to make sure that things are working as expected before the release.
We also need to verify that auto-update works as expected.
@dalehamel
dalehamel / gist:18f3d082e9285cbf2400
Last active August 29, 2015 14:01
release notes 0.4.0-rc4
Thanks for being so patient everyone! We're pretty sure you'll agree it was worth the wait.
This is by far the most stable and performant version of RasPlex to date! We expect it will be our last "release candidate" for 0.4.0.
We're running off of the very latest PHT code, which brings in a long-awaited "PlayQueue" feature - enabling you to easily binge on seasons at a time. Please note that this is very new, and any bugs you find should be reporting to Plex, not us.
Here are our notable changes:
changes:
- Based on PHT 1.1.1
@dalehamel
dalehamel / gist:4ee424fbeaf929731ded
Last active August 29, 2015 14:02
Vagrant File for Alchemy Linux
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@dalehamel
dalehamel / gist:a33daefdd7e842f33e51
Last active August 29, 2015 14:02
Alchemy Transmuter / Collins vagrant file
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.