This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Ever had a mysqldump of utf8 data stored in latin1 tables, dumped in utf8 and | |
munged with windows cp1252? | |
If so this is your friend. Just pipe it through this little baby and spare | |
yourself hours of unicode hell- it'll take your dirt and spit out clean utf8. | |
You can also import it and use it in your python code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# more about graphite events at http://obfuscurity.com/2014/01/Graphite-Tip-A-Better-Way-to-Store-Events | |
import json | |
import requests | |
def create_graphite_event(event_description, tags): | |
required_data = "Graphite needs SSD!" # I tried withouth data attribute and it didn't work | |
tags_string = " ".join(str(x) for x in tags) # Since you will pass an array but graphite expects multi tags like "a,b,c" or "a b c" | |
event = {"what": event_description, "tags": tags_string, "data": required_data} | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
: ${CONFIG:=/boot/config-$(uname -r)} | |
CONFIG_LIST="CONFIG_EXPERT=y | |
CONFIG_EMBEDDED=y | |
CONFIG_CHECKPOINT_RESTORE=y | |
CONFIG_NAMESPACES=y | |
CONFIG_UTS_NS=y | |
CONFIG_IPC_NS=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* See: http://www.css-101.org/articles/ken-burns_effect/css-transition.php | |
*/ | |
/** | |
* Styling the container (the wrapper) | |
* | |
* position is used to make this box a containing block (it becomes a reference for its absolutely positioned children). overflow will hide part of the images moving outside of the box. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# /etc/init.d/ramdisk-manage | |
# | |
case "$1" in | |
start) | |
echo "Syncing files from harddisk to ramdisk" | |
rsync -av /var/lib/ramdisk-persisance/ /mnt/ramdisk/ | |
echo [`date +"%Y-%m-%d %H:%M"`] Ramdisk Synched from HD >> /var/log/ramdisk-manage.log | |
;; |
NewerOlder