Skip to content

Instantly share code, notes, and snippets.

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

Roland Kiraly raverecursion

🏠
Working from home
View GitHub Profile
@raverecursion
raverecursion / gitleaks-all.sh
Created March 22, 2024 10:03
Run gitleaks on all subdirectory and create a combined report
#!/bin/bash
combinedReportPath="$(pwd)/gitleaks-combined-report.json"
# Initialize the combined report
echo "[]" >"$combinedReportPath"
# Iterate through each sub-directory
for dir in */; do
echo "========================================"
@raverecursion
raverecursion / downgrade-to-stable.sh
Last active March 6, 2024 14:31
Downgrade packages after switching from testing to stable in Arch
#!/bin/bash
yay | awk '/is newer than/ {print $2}' > packages_to_downgrade.txt
while IFS= read -r pkg
do
# Trim the trailing colon and any surrounding whitespace
pkg_clean=$(echo "$pkg" | sed 's/:$//' | xargs)
echo "Reinstalling $pkg_clean from the stable repositories..."
sudo pacman -S --needed "$pkg_clean" --noconfirm
@raverecursion
raverecursion / person-sort.ts
Created May 21, 2022 14:24
Sorting by Schwartzian transform -
// The interface for the person objects
interface Person {
firstName: string;
lastName: string;
}
// we use this variable to count calls
let count = 0;
// Gets the full name of a given person
@raverecursion
raverecursion / graphtraversal
Created July 29, 2021 23:39
finding the shortest path between 'A' and 'B' in a 'H'(height) x 'J'(length) grapth
var inputs = readline().split(' ');
const H = parseInt(inputs[0]);
const W = parseInt(inputs[1]);
let aa = []
let bb = []
for (let i = 0; i < H; i++) {
const ROW = readline()
for(let j = 0 ; j < ROW.length; j++) {
@raverecursion
raverecursion / install-all.sh
Last active May 21, 2022 14:26
install all npm packages recursively
find . -name node_modules -prune -o -name package.json -execdir npm install \;
@raverecursion
raverecursion / config.js
Last active May 21, 2021 14:05
Firebase import / export JSON
// Firebase Config
const firebaseConfig = {
apiKey: "API_KEY_HERE",
authDomain: "AUTH_DOMAIN_HERE",
databaseURL: "DATABASE_URL_HERE",
projectId: "PROJECT_ID_HERE",
storageBucket: "STORAGE_BUCKET_HERE",
messagingSenderId: "MESSAGING_ID_HERE"
}
// Exports