Skip to content

Instantly share code, notes, and snippets.

View john-clark's full-sized avatar
🛸
Out there

John Clark john-clark

🛸
Out there
View GitHub Profile
# have your pi automatically log in to x and want to remotely view the screen with rdp
#
sudo apt install freerdp2-shadow-cli
cp /etc/xdg/lxsession/LXDE-pi/autostart .config/lxsession/LXDE-pi/autostart
echo @freerdp-shadow-cli -auth >>.config/lxsession/LXDE-pi/autostart
@john-clark
john-clark / turn_off_wsl_service_after_uninstall.cmd
Created June 22, 2023 16:04
After uninstalling wsl the service still starts!? Service can't be disabled via control panel. Use this to get access back to VT-x
@echo off
net.exe session 1>NUL 2>NUL || (Echo This script requires elevated rights. & Exit /b 1)
set key=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WslService
set val=Start
set new=0x0
set old=
for /F "skip=2 tokens=3" %%r in ('reg query %key% /v %val%') do set old=%%r
echo old=%old%
@echo off
net.exe session 1>NUL 2>NUL || (Echo This script requires elevated rights. & Exit /b 1)
set key=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
set val=ConsentPromptBehaviorAdmin
set new=0x0
set old=
echo 0 = Elevate without prompting
echo 1 = Prompt for credentials on the secure desktop
@john-clark
john-clark / fix_season_series_lmt.ps1
Created June 3, 2023 04:38
Sonarr only updates media file dates, run this to fix season and series folder dates.
$dir = get-childitem -path E:\tv -directory -Exclude "*sonar*"
foreach ($series in $dir){
$show = get-item $series
$show_lwt = $show.LastWriteTime
$seasons = get-childitem -directory $series
foreach ($season in $seasons){
$showseason = get-item "$series\$season"
$season_lwt = $showseason.LastWriteTime
@john-clark
john-clark / install-composer.sh
Created May 10, 2023 18:50
Install composer into user home bin
#!/bin/bash
#
if [ ! -f "$HOME/bin/composer.phar" ]; then
sudo apt-get update | grep -P "\d\K upgraded"
sudo apt-get -y install curl php-cli php-mbstring git unzip | grep -P "\d\K installed"
if [[ ! -f "composer-setup.php" ]]; then
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
fi
HASH="$(wget -q -O - https://composer.github.io/installer.sig)"
HASHFILE=$(php -r "echo hash_file('SHA384','composer-setup.php');")
function Disable-DriveIndexing {
Param($Drive)
$obj = Get-WmiObject -Class Win32_Volume -Filter "DriveLetter='$Drive'"
$indexing = $obj.IndexingEnabled
if("$indexing" -eq $True){
write-host "Disabling indexing of drive $Drive"
$obj | Set-WmiInstance -Arguments @{IndexingEnabled=$False} | Out-Null
}
}
#Use: Disable-DriveIndexing "C:"
10 REM
20 REM ELIZA/DOCTOR
30 REM CREATED BY JOSEPH WEIZENBAUM
40 REM THIS VERSION BY JEFF SHRAGER
50 REM EDITIED (SIC!) AND MODIFIED FOR MITS 8K BASIC 4.0 BY STEVEN NORTH
60 REM CREATIVE COMPUTING PO BOX 789-M MORRISTOWN NJ 07960
70 REM
80 REM -----INITIALIZATION-----
90 DIM C$(72),I$(72),K$(72),F$(72),S$(72),R$(72),P$(72),Z$(72)
100 DIM S(36),R(36),N(36)
@john-clark
john-clark / keycloak-install.md
Created November 5, 2022 15:08
keycloak on debian
@john-clark
john-clark / fuckyou-gmail.en.md
Created September 25, 2022 04:26 — forked from dxdxdt/fuckyou-gmail.en.md
What to do when Gmail marks all the mails from your server as spam

What to do when Gmail marks all the mails from your server as spam

If you're self-hosting your services and having trouble getting your emails through Gmail and infuriated by Google's non-existent support, you're not the only one. I'd like to share my experiences trying to get it sorted out.

I'm the author of the post above. You can tell how arrogant Google employees are from all the previous posts he made in the past.

List of apps in a De-Googled Android OS. Most of the apps are FOSS from F-Droid. Also some tweaks for a more secure OS.

Android OS

  • GrapheneOS
  • CalyxOS
  • LineageOS with Microg (currently using)
  • DivestOS

Android Webview

  • Bromite ♥️🌱 Webview or any Webview needs root phone for installation and recognition to the ROM. Requires AnyWebView module enabled in LSPosed to be able to change the System Webview.