Skip to content

Instantly share code, notes, and snippets.

View gbdoin's full-sized avatar

Gabriel Beaudoin gbdoin

View GitHub Profile
@sjas
sjas / README.md
Created December 17, 2018 15:29 — forked from emschu/MIB_TREE_TO_JSON_TREE_README.md
Generate JSON OID Tree and catalog representation

This is an approach to generate dynamically a JSON representation of an OID tree (=an(y) SNMP MIB) using mibdump.py of python pysmi.

We will generate a flat list of OID objects (oid_catalog.json) + hierarchical json tree (oid_tree.json) with "."-separated nodes of RFC 1213 MIB.

1. Setup + get MIB(s) as JSON

$ pip install pysmi
# walk into and/or create a new directory you run the following command in
$ mibdump.py --destination-format=json --generate-mib-texts --build-index --mib-stub= RFC1213-MIB
@thomaspockrandt
thomaspockrandt / philips-hue-control.html
Last active May 16, 2019 01:54
Simple Philips Hue Control (jQuery)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Philips Hue Control</title>
<script src="http://code.jquery.com/jquery-3.1.1.min.js"></script>
<script type="text/javascript">
$(function() {
var apiBaseUrl = null;
@ItsAdventureTime
ItsAdventureTime / .rtorrent.rc
Created August 8, 2014 20:03
This an optimized version of the rTorrent configuration file.
#
#
# The Seedbox From Scratch Script
# By Notos ---> https://github.com/Notos/
#
#
######################################################################
#
# Copyright (c) 2013 Notos (https://github.com/Notos/)
#
@leolimajr
leolimajr / os-x-enable-trim.txt
Created November 21, 2012 11:10 — forked from clarencesong/os-x-enable-trim.md
Enable TRIM in OS X 10.8.2 for IOAHCIBlockStorage version 2.3.1
Enable TRIM on non-Apple SSDs in OS X 10.8.2 Mountain Lion.
WARNING: This is ONLY tested on 10.8.2 (IOAHCIBlockStorage version 2.3.1), and NOT earlier or later versions.
Check /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/version.plist
Technical note: The driver changed in 10.8.2 and similar perl commands that worked in earlier OS X versions did not work for me once I updated to 10.8.2.
Run the following commands in Terminal…