Skip to content

Instantly share code, notes, and snippets.

Hal Martin halmartin

Block or report user

Report or block halmartin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@halmartin
halmartin / boot.py
Created Feb 5, 2018
MicroPython boot.py file, used on Wemos D1 mini temperature sensor
View boot.py
# This file is executed on every boot (including wake-boot from deepsleep)
import gc
gc.collect()
# connect to WiFi
import network
sta_if = network.WLAN(network.STA_IF)
sta_if.active(True)
sta_if.connect("MySSID","P4ssw0rd!")
from time import sleep
@halmartin
halmartin / th_wemos-5a0385.py
Last active Jun 3, 2018
MicroPython for Wemos D1 mini to read temperature/humidity and report to InfluxDB
View th_wemos-5a0385.py
import urequests
from time import sleep
from machine import Pin, reset
p2 = Pin(2, Pin.OUT)
HOST="wemos-5a0385"
LENGTH=60
def TempSensReport():
from sht30 import SHT30
@halmartin
halmartin / temperature_S1200BTL.sh
Last active Jan 22, 2018
FreeBSD: collectd metrics for Intel S1200BTL CPU, BMC, and PSU
View temperature_S1200BTL.sh
#!/bin/sh
HOSTNAME="${COLLECTD_HOSTNAME:-`hostname -f`}"
INTERVAL="${COLLECTD_INTERVAL:-30}"
while sleep "$INTERVAL"; do
/sbin/sysctl -a | awk -F'[. ]' '/dev\.cpu\.[0-9]\.temperature/ {printf "%s %s\n",$3,$5}'|while read c t
do
echo "PUTVAL \"$HOSTNAME/temperature/temperature-cpu${c}\" interval=$INTERVAL N:${t%%.*}"
done
@halmartin
halmartin / temperature.sh
Created Jan 10, 2018
FreeBSD: collectd temperature Dell R210 II CPU & BMC
View temperature.sh
#!/bin/sh
HOSTNAME="${COLLECTD_HOSTNAME:-`hostname -f`}"
INTERVAL="${COLLECTD_INTERVAL:-30}"
while sleep "$INTERVAL"; do
/sbin/sysctl -a | awk -F'[. ]' '/dev\.cpu\.[0-9]\.temperature/ {printf "%s %s\n",$3,$5}'|while read c t
do
echo "PUTVAL \"$HOSTNAME/temperature/temperature-cpu${c}\" interval=$INTERVAL N:${t%%.*}"
done
@halmartin
halmartin / uP_0.txt
Created Jan 8, 2018
WT61P805 partial firmware from WD Yosemite
View uP_0.txt
00000000 02 5d a9 02 10 00 12 63 8e 22 32 02 6d 35 0d 0a |.].....c."2.m5..|
00000010 00 ff ff 02 6d d7 ff ff ff ff ff 02 56 c7 ff ff |....m.......V...|
00000020 ff ff ff 02 59 49 7f 01 12 00 46 7f 02 7e 00 12 |....YI....F..~..|
00000030 6b e0 22 02 6f ac ff ff ff ff ff 02 6d f4 ff ff |k.".o.......m...|
00000040 ff ff ff 02 00 0a 90 12 cd ef f0 e4 ff 12 6a ce |..............j.|
00000050 e4 ff 12 6b 06 7f 01 12 6b 3e 12 0f f8 12 0f f8 |...k....k>......|
00000060 90 12 cd e0 ff 12 6f 90 12 0f f8 12 0f f8 e4 ff |......o.........|
00000070 12 6b 3e 12 0f f8 12 0f f8 22 ff 02 10 00 90 11 |.k>......"......|
00000080 bb e0 70 05 90 11 ea 04 f0 e5 42 64 01 70 46 fe |..p.......Bd.pF.|
00000090 7f 11 fd 7b 01 7a 11 79 d3 12 4d b4 e4 90 12 c2 |...{.z.y..M.....|
@halmartin
halmartin / mcu_upgrade_strace_write.txt
Created Jan 8, 2018
Western Digital Yosemite mcu_upgrade strace write calls
View mcu_upgrade_strace_write.txt
write(3, "\17WT61P8\377", 8) = 8
write(3, "\17\2 \2\2\2\377", 7) = 7
write(3, "\17\16\2\214\214\214\377", 7) = 7
write(3, "\17\16\0\270\270\270\377", 7) = 7
write(3, "\17\r\0\0\0\0\377", 7) = 7
write(3, "\17\r\10\0\0\0\377", 7) = 7
write(3, "\17\r\20\0\0\0\377", 7) = 7
write(3, "\17\r\30\0\0\0\377", 7) = 7
write(3, "\17\r \0\0\0\377", 7) = 7
write(3, "\17\r(\0\0\0\377", 7) = 7
@halmartin
halmartin / mcu_upgrade_Yosemite_strings.txt
Created Jan 8, 2018
Western Digital Yosemite mcu_upgrade binary strings
View mcu_upgrade_Yosemite_strings.txt
/lib/ld-linux.so.3
librs232.so
RS232_Send
_fini
RS232_Read
RS232_Open
__gmon_start__
RS232_SetParam
RS232_Close
_Jv_RegisterClasses
@halmartin
halmartin / upload_firmware_Yosemite_strings.txt
Created Jan 8, 2018
Western Digital Yosemite upload_firmware binary strings
View upload_firmware_Yosemite_strings.txt
/lib/ld-linux.so.3
libshare.so
xmldbc_get_wb
_fini
LIB_Get_Dev_SCSI_Map
xml_get_int
__gmon_start__
LIB_Get_Disk_Size
LIB_Check_Mounts_OK
_Jv_RegisterClasses
@halmartin
halmartin / WD_MyCloud_NAS_Codenames.txt
Created Jan 8, 2018
Western Digital My Cloud codenames
View WD_MyCloud_NAS_Codenames.txt
Single bay:
Glacier: WD My Cloud
Dual bay:
BryceCanyon: WD My Cloud PR2100
KC/Zion: WD My Cloud EX2
RP/GT (GrandTeton): WD My Cloud EX2 Ultra
Yosemite: WD My Cloud EX2100
Quad bay:
View DK200_WindRiver.crt
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
87:8d:c5:e9:d8:81:a7:37
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=CN, ST=Beijing, L=Beijing, O=WindRiver-Beijing, OU=PFG, CN=IDP-OWNER/emailAddress=owner@windriver.com
Validity
Not Before: Apr 17 03:43:07 2014 GMT
Not After : Apr 14 03:43:07 2024 GMT
You can’t perform that action at this time.