Skip to content

Instantly share code, notes, and snippets.

Avatar
🚺

Robert Moore moorer2k

🚺
  • WA State
View GitHub Profile
@moorer2k
moorer2k / Set-XMRIG-Threads.ps1
Created May 28, 2021
Simple PowerShell script to change between your min / max threads to use for XMRIG on windows.
View Set-XMRIG-Threads.ps1
#Automatically switch between desired threads for XMRIG.
$path = 'C:\Users\Moore\Desktop\xmrig\config.json'
$minThreads = '15'
$maxThreads = '28'
if (Select-String -Path $path -Pattern "$minThreads," -SimpleMatch -Quiet)
{
(Get-Content $path) -replace "$minThreads,", "$maxThreads," | Out-File -encoding ASCII $path
}
View keybase.md

Keybase proof

I hereby claim:

  • I am moorer2k on github.
  • I am moorer (https://keybase.io/moorer) on keybase.
  • I have a public key ASD23Ha0wkfvgSabIH4keVfmhELkUQetkBzEofOFXIgO0Ao

To claim this, I am signing this object:

View gist:823e917b985735eed33150806a30987a
opkg install python3-cryptodomex
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
pip install -U setuptools
pip install scapy
git clone https://github.com/hexway/r00kie-kr00kie.git && cd ./r00kie-kr00kie
View oh-my-zsh on pineapple-tetra.md
opkg update && opkg install ca-certificates zsh curl git-http
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" 
sed -i -- 's:/bin/ash:/bin/zsh:g' /etc/passwd


# -- reboot, all done. 
@moorer2k
moorer2k / DecodeUri.vb
Last active Jun 3, 2018
decodeURI Javascript equivlent for VB.NET. When DecodeURL / Unescape does not work for you.
View DecodeUri.vb
Public Function DecodeUri(ByVal inputText As String)
Dim rx As New System.Text.RegularExpressions.Regex("(\\x.{2})")
For Each m As System.Text.RegularExpressions.Match In rx.Matches(inputText)
inputText = inputText.Replace(m.Groups(1).Value, Chr(m.Groups(1).Value.Replace("\x", "&H")))
Next
inputText = WebUtility.UrlDecode(inputText)
If inputText.Contains("%") Then 'just make sure it's actually fully decoded. Sometimes it skips a necessary step for all parameters to be decoded.
inputText = WebUtility.UrlDecode(inputText)
End If
Return inputText
@moorer2k
moorer2k / DecodeUri.vb
Created Jun 3, 2018
decodeURI Javascript equivlent for VB.NET. When DecodeURL / Unescape does not work for you.
View DecodeUri.vb
Public Function DecodeUri(ByVal inputText As String)
Dim rx As New System.Text.RegularExpressions.Regex("(\\x.{2})")
For Each m As System.Text.RegularExpressions.Match In rx.Matches(inputText)
inputText = inputText.Replace(m.Groups(1).Value, Chr(m.Groups(1).Value.Replace("\x", "&H")))
Next
Return inputText
End Function
@moorer2k
moorer2k / FanController.php
Created May 11, 2018
Laravel console command for automated control over TP-Link HS100. Automatically turn on my plugged in fan if temps get over 55 C.
View FanController.php
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Process\Process;
class FanController extends Command
{
@moorer2k
moorer2k / GetCPUTemps.php
Last active Apr 7, 2020
Use Symfony to execute lm_sensors and return a json response.
View GetCPUTemps.php
<?php
namespace App;
use Symfony\Component\Process\Process;
use Symfony\Component\Process\Exception\ProcessFailedException;
class GetCPUTemps
{
public function getTemps(){
@moorer2k
moorer2k / rtlsdr-decoder-setup.sh
Last active Jul 7, 2021
Automated setup created for DietPi on an RPI2 for RTL-SDR pager decoding using mutlimon-ng and pagermon. Uses version managers for node and python to keep it isolated + correctly compiled.
View rtlsdr-decoder-setup.sh
#DietPi setup script for RTL-SDR/Multimon-ng/Pagermon for decoding pager messages(FLEX/POCSAG etc.)
cat <<EOF >no-rtl.conf
blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830
EOF
mv no-rtl.conf /etc/modprobe.d/
View gist:a96d485c062709b439ce1edbc4384309
This file has been truncated, but you can view the full file.
<html>
<head></head>
<body>
<div hidden="" by-polymer-bundler="">
<script>
(function() {
"use strict";