View bpq32.cfg
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 config file is validated to work with the linbpq binary with md5sum 9e065d6fa2092ed720e3ca1c73678415 on the Raspberry Pi 4 | |
SIMPLE ; This set a whole load of paramters to reasonable defaults | |
LOCATOR=IO91lk ; Set to your Grid Square to send reports to the BPQ32 Node Map system | |
NODECALL=M0LTE-7 | |
NODEALIAS=CALCOT | |
AUTOSAVE=1 | |
MAPCOMMENT=Experimental on 144.950 (MAPCOMMENT) | |
OBSINIT=6 |
View install-dnc-hosting-bundle.ps1
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
$ProgressPreference='SilentlyContinue' | |
wget https://download.visualstudio.microsoft.com/download/pr/86df96bb-384c-4d7a-82ce-2e4c2c871189/045870c1ab4004219cb312039c5a64d5/dotnet-hosting-2.1.5-win.exe -outfile .\dnc-hosting.exe | |
start-process -wait .\dnc-hosting.exe -args "/install /quiet /norestart" -nonewwindow | |
iisreset |
View gist:43d8f3bd8de43b4b4d14a9539aa4426d
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
VS -> new solution -> .NET Core 2.1 web app (MVC) | |
untick HTTPS | |
restore packages | |
Run locally | |
Close | |
Right click | |
Publish | |
Choose folder-> publish | |
Publish immediately | |
Open publish folder |
View install-service.sh
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
echo "[Unit] | |
Description=My Service Name | |
[Service] | |
WorkingDirectory=$workingdir | |
ExecStart=$workingdir/binary-name | |
Restart=always | |
RestartSec=10 # Restart service after 10 seconds if it crashes | |
SyslogIdentifier=myservicename | |
User=root | |
Environment=\"ASPNETCORE_ENVIRONMENT=Production\" |
View gist:28756860345027ee894f769f9f8f8e1c
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 up a swapfile | |
dd if=/dev/zero of=/swap.file bs=1024 count=1048576 | |
mkswap /swap.file | |
chmod 0600 /swap.file | |
swapon /swap.file | |
echo " | |
/swap.file none swap sw 0 0" >> /etc/fstab | |
echo " | |
vm.swappiness=10" >> /etc/sysctl.conf |
View test-web.sh
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 | |
# called by influx-mon.sh which is called by cron every minute | |
curloutput=$(curl -A "influx-mon" -ss -L --connect-timeout 5 -w "\n%{http_code}" $1) | |
exitcode=$? | |
body=$(echo "$curloutput" | head -n -1) | |
httpcode=$(echo "$curloutput" | tail -n 1) | |
if [ $exitcode -ne 0 ]; then |
View influx-mon.sh
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 | |
# called by cron every minute | |
function postToInflux(){ | |
curl -ss -o /dev/null --connect-timeout 5 -X POST 'https://influxdb.trlsoftware.com/write?db=database&u=user&p=pass' --data-binary "web_up,site=$1 value=$2 $(date +%s%N)" | |
} | |
declare -A sites | |
declare -A check |
View userdata.ps1
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
<powershell> | |
$windows_admin_password="mypassword" | |
function log { | |
echo $args[0] | out-file -append c:\bootstrap-status.log | |
} | |
log "Setting Windows password" | |
$admin = [adsi]("WinNT://./administrator, user") |
View devreset.ps1
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
$vmname="server2016eval"; $snapname='server2016eval - (02/02/2018 - 15:12:33)'; stop-vm $vmname; if ((get-vm $vmname).State -eq 'Running') {stop-vm -turnoff $vmname}; restore-vmsnapshot -name $snapname -confirm:$false -vmname $vmname; start-vm $vmname |
View update-vs2017-layout.cmd
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
@echo off | |
rem A vs2017 folder must exist within this UNC | |
pushd %targetunc% | |
md %UserProfile%\Desktop\vs2017 | |
copy vs2017\vs_professional.exe %UserProfile%\Desktop\vs2017 | |
start /wait %UserProfile%\Desktop\vs2017\vs_professional.exe --layout %UserProfile%\Desktop\vs2017 --quiet | |
del /q /s vs2017 | |
rd /q /s vs2017 | |
robocopy /move /e %UserProfile%\Desktop\vs2017 vs2017 * | |
popd |
NewerOlder