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
const fs = require('fs'); | |
const path = require('path'); | |
const yaml = require('js-yaml'); | |
console.log('Starting the version pinning and cleaning process...'); | |
// Utility function to determine which package manager is used | |
const determinePackageManager = () => { | |
if (fs.existsSync(path.join(__dirname, 'pnpm-lock.yaml'))) { | |
return 'pnpm'; |
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
import os | |
import json | |
import subprocess | |
import requests | |
# Compatibility table for pnpm versions based on Node.js versions (only the major versions) | |
pnpm_compatibility = { | |
'14': '6', # PNPM 6 for Node 14 | |
'16': '7', # PNPM 7 for Node 16 | |
'18': '8', # PNPM 8 for Node 18 |
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
const toHTMLEntities = (html) => { | |
let result = ''; | |
for (let i = 0; i < html.length; i++) { | |
result += "&#x" + html[i].charCodeAt(0).toString(16) + ";"; | |
} | |
return result; | |
} |
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 | |
while true | |
do | |
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s | |
sleep 10 | |
done |
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
# Increase history | |
$MaximumHistoryCount = 10000 | |
# Produce UTF-8 by default | |
$PSDefaultParameterValues["Out-File:Encoding"]="utf8" | |
# Show selection menu for tab | |
Set-PSReadlineKeyHandler -Chord Tab -Function MenuComplete | |
# Helper Functions |
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
### Base Windows Configuration ### | |
<# | |
The command to run, built from the raw link of this gist | |
Win+R | |
iexplore http://boxstarter.org/package/url?<RAW GIST LINK> | |
OR (if you don't like the way the web launcher force re-installs everything) | |
Create another script like the following to install and run the gist: |
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 | |
# see: https://apple.stackexchange.com/a/311511/291269 | |
function install_dmg { | |
set -x | |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
# Initialize a variable for the URL to the '.dmg' |
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/sh | |
# Reset Parallels Desktop's trial and generate a casual email address to register a new user | |
sudo rm /private/var/root/Library/Preferences/com.parallels.desktop.plist /Library/Preferences/Parallels/licenses.xml | |
jot -w pdu%d@gmail.com -r 1 |
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 | |
if [ $# -eq 1 ] | |
NM=`uname -a && date` | |
NAME=`echo $NM | md5sum | cut -f1 -d" "` | |
then | |
ppa_name=`echo "$1" | cut -d":" -f2 -s` | |
if [ -z "$ppa_name" ] | |
then | |
echo "PPA name not found" | |
else |
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 | |
echo "[+] Installing XFCE4, this will take a while" | |
sudo apt update | |
sudo apt dist-upgrade -y --force-yes | |
sudo apt --yes --force-yes install kali-desktop-xfce xorg xrdp | |
echo "[+] Configuring XRDP to listen on port 3390 (but not starting the service)..." | |
echo "[+] To start the service run: sudo /etc/init.d/xrdp start" | |
sudo sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini | |
sudo echo "alias startx=\"sudo /etc/init.d/xrdp start\"" > ~/.bash_aliases | |
sudo echo "alias stopx=\"sudo /etc/init.d/xrdp stop\"" > ~/.bash_aliases |
NewerOlder