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
#!/bin/sh | |
# check the /dev/yurex0 is readable from user 'munin'! | |
if [ "$1" = "config" ]; then | |
cat << EOM | |
graph_title Yurex BBU | |
graph_vlabel BBU | |
yurex.label yurex | |
EOM |
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
#!/bin/bash | |
# Usage: ./honeywell_settmp.sh [-c|-h|-o] [<temp(F)>|schedule] | |
# Example: ./honeywell_settmp.sh -h 72 # set HEAT: temp=72F | |
# ./honeywell_settmp.sh -c schedule # set COOL: follow shceduled temp | |
# ./honeywell_settmp.sh -o # turn system OFF | |
######## Settings ######## | |
LOGIN="YOUR_MAIL_ADDRESS" | |
PASSWORD="YOUR_PASSWORD" |
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
// Arduino Sketch to send IR signal to FS-IRH100 | |
// Connect Infra-red LED to pin 3 & GND | |
// bit set / clear | |
#ifndef cbi | |
#define cbi(PORT, BIT) (_SFR_BYTE(PORT) &= ~_BV(BIT)) | |
#endif | |
#ifndef sbi | |
#define sbi(PORT, BIT) (_SFR_BYTE(PORT) |= _BV(BIT)) |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
struct __attribute__((packed)) bitmapFileHeader { | |
unsigned char bfType[2]; | |
unsigned int bfSize; | |
unsigned short bfReserved1; | |
unsigned short bfReserved2; |
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
/*アイコン縮小*/ | |
.uicon{width:16px;height:16px;} | |
/*行間*/ | |
.status{line-height: 1.5;} | |
/*リンク背景透明化*/ | |
span.status a.link,span.status a.resolved,span.status a.link:hover{background-color:transparent !important;border:0;} | |
/*RTアイコン非表示*/ |
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
#include <linux/module.h> | |
#include <linux/kernel.h> | |
#include <scsi/scsi_host.h> | |
#define MV_LINUX | |
#define MV_ARM | |
#define MV_CPU_LE | |
#include "mvSata.h" | |
#include "mvLinuxIalHt.h" |
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
(require 'cl) | |
(defun* get-closest-file-dir (&optional (file "Makefile")) | |
"Determine the directory of the first instance of FILE starting from the current directory towards root. | |
This may not do the correct thing in presence of links. If it does not find FILE, then it shall return nil." | |
(let ((root (expand-file-name "/"))) | |
(loop | |
for d = default-directory then (expand-file-name ".." d) | |
if (file-exists-p (expand-file-name file d)) return d | |
if (equal d root) return nil))) |
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
ifconfig | awk '/inet addr:/{split($2,a,".");split(a[4],b,"");for(x in b) print "QUERY_STRING=\"fn=" int(246*(2**(1/12))**(b[x]*2-(b[x]>0)-(b[x]>3)-(b[x]>7))) "\" playNote"}' | sh |
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
#include <string.h> | |
#include <dlfcn.h> | |
#include <err.h> | |
#include <errno.h> | |
#include <sys/mman.h> | |
#define LIB_PATH "libc.so.6" | |
template <class RET, class... ARGV> | |
class LibHook { |
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
#!/bin/sh | |
osascript -e 'tell application "System Events" | |
try | |
count every window of process "'"$1"'" | |
on error | |
0 | |
end try | |
end tell' 2>/dev/null |