This file contains hidden or 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
# Plugin for the diamond to collect stats from Riak over HTTP. | |
# | |
# Copyright (c) 2013, Metricfire Ltd (Hosted Graphite) | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# * Redistributions in binary form must reproduce the above copyright |
This file contains hidden or 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
// Send process memory usage to Metricfire every ten seconds. | |
var metricfire = require("metricfire"); | |
metricfire.init("your-api-key"); | |
setInterval(function(){ | |
memusage = process.memoryUsage(); | |
metricfire.send("memoryusage.rss", memusage.rss); | |
metricfire.send("memoryusage.heaptotal", memusage.heapTotal); | |
metricfire.send("memoryusage.heapused", memusage.heapUsed); |
This file contains hidden or 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
# Scatters dots randomly on your terminal as a quick demo of curses. | |
import curses | |
import random | |
import time | |
window = curses.initscr() | |
try: | |
(h, w) = window.getmaxyx() |
This file contains hidden or 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
# Unpack | |
gzip -cd /boot/initramfs.example | cpio -i | |
# Repack | |
find . | cpio --dereference -o -H newc | gzip > /boot/initramfs.example |
This file contains hidden or 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
* * * * * curl -s https://[email protected]/v1/metric/smokecheap/tog-dot-ie --data-binary "[$(ping -c 20 tog.ie | awk '/bytes from/{print $8}' | cut -b6-10 | xargs | tr ' ' ',')]" |
This file contains hidden or 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
import metricfire | |
import time | |
# Send to a nonexistant Metricfire aggregation server on this machine. | |
metricfire.init("deadbeef-dead-beef-dead-deadcafebabe", server = "127.0.0.1:6334") | |
before = time.time() | |
for index in xrange(100000): | |
pass | |
after = time.time() |
This file contains hidden or 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
import urllib | |
import time | |
import metricfire | |
from BeautifulSoup import BeautifulSoup | |
metricfire.init("[API key redacted]") | |
previous_values = None | |
while True: |
This file contains hidden or 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
BIFFBOOT v3.3 00B3F600379E 32-bit Loader by bifferos (c) 2010 | |
Redistribution prohibited, all rights reserved. | |
Press <ESC> | |
'help' or '?' for a list of commands | |
BIFFBOOT> ? | |
Available commands: | |
help Print this help | |
? Alias for 'help' | |
credits Print credits | |
analyser Run a simple logic analyser on JTAG/button GPIO |