Skip to content

Instantly share code, notes, and snippets.

View moorer2k's full-sized avatar
🏠
Working from home

Moore moorer2k

🏠
Working from home
View GitHub Profile
@moorer2k
moorer2k / Set-XMRIG-Threads.ps1
Created May 28, 2021 03:06
Simple PowerShell script to change between your min / max threads to use for XMRIG on windows.
#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
}

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:

@moorer2k
moorer2k / gist:823e917b985735eed33150806a30987a
Created August 28, 2020 21:39
Pineapple Tetra r00kie-Kr00k POC
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
@moorer2k
moorer2k / oh-my-zsh on pineapple-tetra.md
Last active September 12, 2018 05:08 — forked from fire1ce/oh-my-zsh on openwrt or lede-project.md
install oh my zsh on pineapple tetra
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 June 3, 2018 04:17
decodeURI Javascript equivlent for VB.NET. When DecodeURL / Unescape does not work for you.
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 June 3, 2018 04:10
decodeURI Javascript equivlent for VB.NET. When DecodeURL / Unescape does not work for you.
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 22:37
Laravel console command for automated control over TP-Link HS100. Automatically turn on my plugged in fan if temps get over 55 C.
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Process\Process;
class FanController extends Command
{
@moorer2k
moorer2k / GetCPUTemps.php
Last active April 7, 2020 23:21
Use Symfony to execute lm_sensors and return a json response.
<?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 January 29, 2024 01:35
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.
#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/
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";