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
curl -X POST -H 'Content-type:application/json' -d '{"jsonrpc":"2.0","method":"user.login","params":{ "user":"unamehere","password":"passwdhere"},"auth":null,"id":0}' http://zabbixserver/zabbix/api_jsonrpc.php | |
response: {"jsonrpc":"2.0","result":"hex-code-here","id":0} | |
requst: | |
curl -X POST -H 'Content-type:application/json' -d '{ | |
"jsonrpc": "2.0", | |
"method": "problem.get", | |
"params": { | |
"output": "extend", |
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
du -ch -d 1 | sort -hr |
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 -e | |
echo "Setting up Zabbix agent" | |
wget --quiet http://repo.zabbix.com/zabbix/3.2/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.2-1+trusty_all.deb | |
dpkg -i zabbix-release_3.2-1+trusty_all.deb | |
rm zabbix-release_3.2-1+trusty_all.deb | |
apt-get update --quiet > /dev/null | |
apt-get install zabbix-agent -y --quiet > /dev/null | |
echo "PidFile=/var/run/zabbix/zabbix_agentd.pid | |
LogFile=/var/log/zabbix/zabbix_agentd.log | |
LogFileSize=10 |
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
public class Compared | |
{ | |
public object Left { get; set; } | |
public object Right { get; set; } | |
} | |
public static System.Collections.Generic.Dictionary<string, Compared> Diff(object o1, object o2) | |
{ | |
var result = new System.Collections.Generic.Dictionary<string, Compared>(StringComparer.Ordinal); |
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
/* | |
* Trivial crossband repeater controller | |
* Yaesu FT-1500m to Baofeng with carrier detect pin brought out | |
* | |
* 1k resistor to NPN transistor base on D5 and D6 | |
* Baofeng PTT pin to D5 transistor collector | |
* Yaesu data port PTT pin to D6 transistor collector | |
* FT-1500m data port SQL line to A0 | |
* Baofeng CD line to A1 | |
* |
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
$GPRMC,170047.00,A,4121.23302,N,00201.31654,W,2.703, ,200417, , ,A*64 | |
$GPRMC,hhmmss.ss,A,llll.ll, a,yyyyy.yy, a,x.x, x.x,ddmmyy,x.x,a,m*hh | |
| | | | | | | | | | | | \- 13 Checksum | |
| | | | | | | | | | | \--- 12 Mode indicator, (A=Autonomous, D=Differential, E=Estimated, N=Data not valid) | |
| | | | | | | | | | \----- 11 E or W of magnetic variation | |
| | | | | | | | | \--------- 10 Magnetic variation degrees (Easterly var. subtracts from true course) | |
| | | | | | | | \---------------- 9 UTC date of fix | |
| | | | | | | \-------------------- 8 Track made good in degrees True | |
| | | | | | \-------------------------- 7 Speed over ground in knots | |
| | | | | \---------------------------- 6 |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO.Ports; | |
using System.Text; | |
namespace kiss_test | |
{ | |
class Program | |
{ |
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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
System.Console.WriteLine(DoHash("mycall")); | |
} | |
static int DoHash(string call) | |
{ | |
string upper = call.ToUpper(); |
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
rtl_fm -f 144800000 -p 42 - | sox --buffer 128 -t raw -r 24k -es -b 16 -c 1 > /root/144800.wav | |
rtl_fm -f 144800000 -p 42 - | sox --buffer 128 -t raw -r 24k -es -b 16 -c 1 - -t wav -r 24k - > /root/144800.wav | |
rtl_fm -f 144800000 -p 42 - | tee /root/144800.raw | sox --buffer 128 -t raw -r 24k -es -b 16 -c 1 - -t wav -r 24k - > /root/144800.wav | |
rtl_fm -f 144800000 -p 42 - | tee <(direwolf -t 0 -c /root/direwolf.conf -r 24000 -D 1 -q d > /tmp/dw.log) | sox --buffer 128 -t raw -r 24k -es -b 16 -c 1 - -t wav -r 24k - > /root/144800.wav |
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 -e | |
# Script to relocate postgres 9.5 data dir on Ubuntu 14.04 to a compressed ZFS volume (single disk, /dev/sdb, assumed to be blank) | |
# install ZFS and tools | |
apt-get install software-properties-common rsync -y | |
echo " | |
" | add-apt-repository ppa:zfs-native/stable | |
apt-get update | |
apt-get install ubuntu-zfs -y |