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/local/rvm/rubies/ruby-1.9.3-p547/bin/ruby | |
# Guy Carpenter - 11 Jul 2014 | |
require 'rubygems' | |
require 'hipchat' | |
# API: https://github.com/hipchat/hipchat-rb | |
# https://www.hipchat.com/docs/api/method/rooms/message | |
to = ARGV[0] | |
subject = ARGV[1] # <Host>:(PROBLEM|OK):(Warning|Error|):<Name> |
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/python | |
# | |
# Command-line: | |
# Dump everything | |
# ./portstat.py | |
# | |
# Dump specific value | |
# ./portstat.py state-time-wait | |
# | |
# UserParameter=oth.port[*],/etc/zabbix/scripts/portstat.py '$1' |
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
Boolean failed = manager.getResult() != "SUCCESS"; | |
def file = new File(manager.build.getWorkspace().getRemote() + '/FailedBuildsCount.txt'); | |
def count = 0; | |
if (failed) { | |
if (!file.exists()) { | |
file.createNewFile(); | |
} else { | |
FileReader reader = new FileReader(file); | |
BufferedReader bufferedReader = new BufferedReader(reader); |
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/ruby | |
# | |
# Save this file as GITDIR/.git/hooks/prepare-commit-msg | |
# where GITDIR is the top directory of your git repository. | |
# then chmod +x prepare-commit-msg | |
# | |
# This hook is invoked by 'git-commit' right after preparing the default log | |
# message, and before the editor is started. | |
# | |
# It takes one to three parameters. The first is the name of the file that the commit |
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
--- bootlog.stock.tmp 2012-02-17 15:02:18.000000000 +1000 | |
+++ bootlog.2.6.28.tmp 2012-02-17 15:02:18.000000000 +1000 | |
@@ -5,37 +5,37 @@ | |
Skipping 3968 chunks | |
Jumping to address 0x40808000: | |
0x00000000 0f 00 a0 e1 08 00 40 e2 02 0a 40 e2 08 10 9f e5 |......@...@.....| | |
-0x00000010 00 00 81 e5 02 00 00 eb 25 05 00 eb 20 20 00 00 |........%... ..| | |
+0x00000010 00 00 81 e5 02 00 00 eb d8 04 00 eb 20 80 80 40 |............ ..@| | |
0x00000020 11 b1 11 c1 14 00 9f e5 14 10 9f e5 00 20 a0 e3 |............. ..| | |
0x00000030 04 20 80 e4 01 00 50 e1 fc ff ff 3a 0e f0 a0 e1 |. ....P....:....| |
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
/* | |
This software uses a BSD license. | |
Copyright (c) 2010, Sean Cross / chumby industries & Limor Fried / adafruit industries (we are both industrious people, eh?) | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions | |
are met: |
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
/* | |
Copyright (c) 2011 Guy Carpenter | |
*/ | |
#include <Arduino.h> | |
#include "Command.h" | |
#define CMDBUF_LEN 40 | |
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
#define PIN_VCC 3 | |
#define PIN_GND 4 | |
#define PIN_SENSE A0 | |
#define FORWARD 1 | |
#define REVERSE -1 | |
#define SAFE_DELAY 1000 | |
#define COUNT_DELAY 1000 |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <linux/i2c-dev.h> | |
#include <fcntl.h> | |
#include <string.h> | |
#include <sys/ioctl.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <unistd.h> |
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
import gaugette.ssd1306 | |
from gaugette.fonts import arial_16 | |
from gaugette.fonts import arial_mono_15 | |
RESET_PIN = 15 | |
DC_PIN = 16 | |
buffer_width = 128 |
OlderNewer