Skip to content

Instantly share code, notes, and snippets.

Created by SHF from KPMS
rugged, Chapter 1
"Utterson, the lawyer, was a man of a rugged countenance, that was never lighted by a smile; cold, scanty and embarrassed in discourse; backward in sentiment; lean, long, dusty, dreary, and yet somehow lovable. "
Can be used as a adjective
Definitions:
(of ground or terrain) having a broken, rocky, and uneven surface.
(of clothing, equipment, etc.) strongly made and capable of withstanding rough handling.
------examples from internet------
a rugged coastline
@XMB5
XMB5 / irconvert.js
Last active March 5, 2024 16:51
Convert from infrared pronto codes to raw codes
//usage: node irconvert.js <pronto hex>
//steps from https://stackoverflow.com/a/27323452
numbers=process.argv[2].split(' ').map(x=>parseInt(x,16))
fullSequenceConverted=[]
carrierFrequency = 1000000/(numbers[1] * .241246)
codeLength = numbers[2]
repeatCodeLength = numbers[3]
for(i=4;i<numbers.length;i++) {
@XMB5
XMB5 / zippyshare-direct.sh
Last active August 27, 2018 23:53
Get the direct URL of a zippyshare download page
#!/bin/bash
#node, curl, awk, and gnu grep must be installed
SCRIPT=`curl "$1" -sL -H'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/68.0.3440.106 Chrome/68.0.3440.106 Safari/537.36' | grep -oP "document.getElementById\('dlbutton'\)\.href = \K.+?(?=;)"`
RELATIVE=`node -e "require=0;process=0;module=0;console.log($SCRIPT)"`
HOST=`echo "$1" | awk -F[/:] '{print $4}'`
echo "https://$HOST$RELATIVE"
@XMB5
XMB5 / deb-compression.sh
Last active September 18, 2018 19:52
Change deb file compression algorithm
COMP=gzip
for i in *.deb; do
echo "$i"
mkdir "$i.extract"
dpkg-deb -R "$i" "$i.extract"
rm "$i"
dpkg-deb -b "-Z$COMP" "$i.extract" "$i"
rm -rf "$i.extract"
done
@XMB5
XMB5 / ipsw-extract.sh
Created September 28, 2018 23:52
extract ipsw root file system on linux
#!/bin/bash
USAGE=$'extract ipsw root file system on linux
usage: ipsw-extract.sh iPhone_Restore.ipsw
requires apfs-fuse - https://github.com/sgan81/apfs-fuse'
if [ -z "$1" ]; then
echo "$USAGE"
exit 1
fi
@XMB5
XMB5 / openvpn-setup.sh
Last active June 3, 2023 20:33
Easy automatic OpenVPN setup for Ubuntu Server
#!/bin/bash
#easy openvpn server setup for ubuntu
read -p "port (1-65535): " PORT
read -p "protocol (udp or tcp): " PROTOCOL
read -p "encrypt (y or n): " ENCRYPT
read -p "hmac (y or n): " HMAC
read -p "xor scramble (y or n): " SCRAMBLE
read -p "compress (y or n): " COMPRESS_YN
read -p "network number (0-255): " NETWORK_NUM
@XMB5
XMB5 / setup.ps1
Last active November 27, 2018 01:55
#iex ((New-Object System.Net.WebClient).DownloadString('https://git.io/fpzIR'))
cd ~\Desktop
Import-Module BitsTransfer
Add-Type -AssemblyName System.IO.Compression.FileSystem
function Unzip
{
param([string]$zipfile, [string]$outpath)
[System.IO.Compression.ZipFile]::ExtractToDirectory(
$ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($zipfile),
$ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($outpath))
iex ((New-Object System.Net.WebClient).DownloadString('https://git.io/fpzIR'))
@XMB5
XMB5 / arch-install-guide.txt
Created January 5, 2019 03:10
Arch Linux Install Guide
#download the arch linux ISO from https://www.archlinux.org/download/
#write the ISO onto an installation medium like a DVD or flash drive
#boot the server off of the installation medium
#now we install arch linux from the bootable medium
#based off of https://www.youtube.com/watch?v=f5MewjcSjDA
wget https://matmoul.github.io/archfi
sh archfi
Disk Partitions
Auto Partitions (gpt)
/dev/sda
@XMB5
XMB5 / clion-install.ps1
Last active December 19, 2019 20:56
Jetbrains Product Installer without admin
$ideCode = Read-Host 'CL - Clion
PC - Pycharm
IIU - IntelliJ
WS - WebStorm
Enter an IDE code'
cd ~\Desktop
$WshShell = New-Object -comObject WScript.Shell
echo "Downloading 7-zip..."
Invoke-WebRequest -Uri 'https://drive.google.com/uc?export=download&id=1I8V3qqBq6R0jkrNaDrk4nxYKHdQgWaep' -OutFile 7za.exe -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::FireFox
echo "Fetching product info..."