Skip to content

Instantly share code, notes, and snippets.

View ckolos's full-sized avatar
💭
This is my happy face.

Chris Kolosiwsky ckolos

💭
This is my happy face.
View GitHub Profile
@nbrownus
nbrownus / edgemax-snmp.txt
Created October 12, 2016 01:37
Interesting snmp stats from a ubiquiti edgemax
# This is not an inclusive list, there were things I left that, things I totally don't care about or don't know I care about
# snmpwalk -OT -v 2c -c "public" <your routers private ip>
# snmpwalk -OT -v 2c -c "public" <your routers private ip> 1.3
# system
HOST-RESOURCES-MIB::hrSystemProcesses.0 = Gauge32: 32
HOST-RESOURCES-MIB::hrSystemNumUsers.0 = Gauge32: 0
# memory info
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 495532 kB
@bearfrieze
bearfrieze / comprehensions.md
Last active December 23, 2023 22:49
Comprehensions in Python the Jedi way

Comprehensions in Python the Jedi way

by Bjørn Friese

Beautiful is better than ugly. Explicit is better than implicit.

-- The Zen of Python

I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.

@jrgm
jrgm / check-oauth-yaml.js
Created January 15, 2016 21:15
check for typos in config file
#!/usr/bin/env node
// Run this script after editing ./fxa/yaml/type/fxa.fxa_oauth.prod.yaml or
// ./fxa/yaml/type/fxa.fxa_oauth.stage.yaml and fix any typos before
// committing changes.
var assert = require('assert')
var fs = require('fs')
var yaml
@sebsto
sebsto / gist:468670c7c0d5feeade69
Created March 20, 2015 07:53
AWS CLI : discover your service limits from the command line
aws support describe-trusted-advisor-check-result --check-id eW7HH0l7J9 --query 'result.sort_by(flaggedResources[?status!="ok"],&metadata[2])[].metadata' --output table --region us-east-1