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
set PGUSER=postgres | |
set PGPASSWORD=xxx | |
set OUTPUTPATH=e:\myfile.backup | |
set DB=whatever | |
set HOST=whatever | |
pg_dump -h %HOST% -p 5432 -U %PGUSER% -F c -b -v -f %OUTPUTPATH% %DB% | |
rem TCP port to unblock is 5432 | |
echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf |
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
namespace FixEnterpriseWsdl | |
{ | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Xml; | |
/// <summary> | |
/// Implements a fix for https://developer.salesforce.com/forums?id=906F0000000AiPEIA0 |
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
mkdir mprime | |
pushd mprime | |
wget http://www.mersenne.org/ftp_root/gimps/p95v2810.linux64.tar.gz | |
tar zxfv p95v2810.linux64.tar.gz | |
popd | |
./mprime/mprime -m |
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
# run once | |
sed -i -e '/^readahead=/s/^.*$/readahead=32/' /usr/lib/tuned/throughput-performance/tuned.conf | |
echo "mongod soft nproc 64000" > /etc/security/limits.d/90-nproc.conf | |
echo '#!/bin/sh -e | |
echo never > /sys/kernel/mm/transparent_hugepage/defrag | |
echo never > /sys/kernel/mm/transparent_hugepage/enabled' > /usr/local/sbin/mongodb-prep.sh | |
chmod +x /usr/local/sbin/mongodb-prep.sh | |
echo '[Unit] | |
Description=mongodb prep | |
Before=mongod.service |
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 |
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
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
/* | |
* 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
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
du -ch -d 1 | sort -hr |