I hereby claim:
- I am smrchy on github.
- I am smrchy (https://keybase.io/smrchy) on keybase.
- I have a public key whose fingerprint is 9A2E 37AF 00EC ED7B 3CD1 02C2 3D70 4FC2 C01C CE2C
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| # Delete all containers | |
| docker rm $(docker ps -a -q) | |
| # Delete all images | |
| docker rmi $(docker images -q) |
| { | |
| "elements": [ | |
| { | |
| "nodes": [ | |
| { | |
| "node": "1", | |
| "devicetype_id": 7, | |
| "element_id": "27106-35982", | |
| "powersettings": [ | |
| { |
Transform a correctly sorted SQL query with id and parentid
into a tree object. Use _queryTreeSort() to sort you SQL query.
Parameters:
q (Array): A query result (see example below)id (String): The name of the id column (Default: "id")parentid (String): The name of the ParentItemID column (Default: "parentid")Note: Please check this blog post for more details on these functions.
Sort a SQL query with id and parentid so that
the rows have the correct order of the tree.
Parameters:
q (Array): A query result (see example below)| # Truncate a logfile while some process is logging into the file | |
| cat /dev/null > some_log_file.log |
| // ---------------------------------------------------------- | |
| // A short snippet for detecting versions of IE in JavaScript | |
| // without resorting to user-agent sniffing | |
| // ---------------------------------------------------------- | |
| // If you're not in IE (or IE version is less than 5) then: | |
| // ie === undefined | |
| // If you're in IE (>=5) then you can determine which version: | |
| // ie === 7; // IE7 | |
| // Thus, to detect IE: | |
| // if (ie) {} |
| # ## redisZsetWorker | |
| # Requires Underscore.js | |
| # http://documentcloud.github.com/underscore/ | |
| # | |
| # Creates an easy to use object from a Redis sorted set. | |
| # | |
| # * Calculate to total, min and max of all scores | |
| # * Calculate a font size (default: 1-10) to create a tag cloud | |
| # * Calculate the percentage for each item | |
| # |
| # -*- coding: utf-8 -*- | |
| """ | |
| amazon_sender.py | |
| ~~~~~~~~ | |
| Python helper class that can send emails using Amazon SES and boto. | |
| The biggest feature of this class is that encodings are handled properly. | |
| It can send both text and html emails. | |
| This implementation is using Python's standard library (which opens up for a lot more options). |