Skip to content

Instantly share code, notes, and snippets.

View bdombro's full-sized avatar

Brian Dombrowski bdombro

View GitHub Profile
@bdombro
bdombro / .gitlfstracks
Last active March 27, 2024 16:43
Git LFS Default Tracks - Common binary file extensions
"To include this, run `cat .gitlfstrack | xargs git lfs track`"
"*.3ds"
"*.3g2"
"*.3gp"
"*.7z"
"*.a"
"*.aac"
"*.adp"
"*.ai"
"*.aif"
sudo timeshift --create --scripted --comments "Fresh install" &> /dev/null # first snapshot works but reports error
echo "*******Install Foundation*******"
sudo cp -rf /etc /etc.orig
# Allow sudo password prompts and sessions to last forever
print "\nDefaults env_reset,timestamp_timeout=-1,passwd_timeout=0\n" | sudo tee -a /etc/sudoers
# Set suspend to always suspend-then-hibernate
sudo ln -s /usr/lib/systemd/system/systemd-suspend-then-hibernate.service /etc/systemd/system/systemd-suspend.service
#!/bin/bash
echo "
Note: If user is not yet created use other script manjaro-create-user.sh
Because you can only create encrypted home for another not logged in user, you must create a separate user to set up the encrypted home for.
The manjaro_setup_encrypted_home.sh script will set the ecryptfs pam moduls, and encrypt the home dir if the user has no running processes (not logged in).
ADMIN_USER=manjaro
echo "*******Creating $ADMIN_USER with encrypted home*******"
# Enable user home encryption features (doesnt actually encrypt anything, just enables the features
sudo pacman -Sy lsof
sudo modprobe ecryptfs
if [ $(grep pam_ecryptfs /etc/pam.d/system-auth | wc -l) = "0" ]; then
sudo sed -i '/^auth\s*\[default=die\]\s*pam_faillock.so\s*authfail/a auth [success=1 default=ignore] pam_succeed_if.so service = systemd-user quiet\nauth required pam_ecryptfs.so unwrap' /etc/pam.d/system-auth
sudo sed -i '/^-password\s*\[success=1\s*default=ignore\]\s*pam_systemd_home.so/i password optional pam_ecryptfs.so' /etc/pam.d/system-auth
sudo sed -i '/^session\s*required\s*pam_unix.so/a session [success=1 default=ignore] pam_succeed_if.so service = systemd-user quiet\nsession optional pam_ecryptfs.so unwrap' /etc/pam.d/system-auth
#!/usr/bin/env zx
$.verbose = argv.verbose;
$.silent = argv.silent;
import {
assertGit,
assertGithubCli,
getGitCtxT,
HandledError,
@bdombro
bdombro / zx-lib.mjs
Created March 10, 2022 22:47
A shared lib for zx
#!/usr/bin/env zx
/**
* Util/Lib functions for zx scripts
*/
/* eslint-disable i18next/no-literal-string */
/* eslint-disable no-console */
export class HandledError extends Error {}
@bdombro
bdombro / zx-template.mjs
Last active March 10, 2022 17:02
A template/starter for a zx script
#!/usr/bin/env zx
// eslint-disable-next-line import/no-unresolved
// import { startSpinner } from 'zx/experimental';
const about = `
/**
* myscript.mjs
* - what i do
* - why i do
@bdombro
bdombro / jest-update-snaps.mjs
Last active March 10, 2022 16:40
jest-update-snaps.mjs
#!/usr/bin/env zx
/* eslint-disable i18next/no-literal-string */
// eslint-disable-next-line import/no-unresolved
import { startSpinner } from 'zx/experimental';
import {
assertGit,
assertGithubCli,
// This JS will switch FB messenger to dark theme
var css = `
:root, .__fb-light-mode {
--fds-black: black;
--fds-black-alpha-05: rgba(0, 0, 0, 0.05);
--fds-black-alpha-10: rgba(0, 0, 0, 0.1);
--fds-black-alpha-15: rgba(0, 0, 0, 0.15);
--fds-black-alpha-20: rgba(0, 0, 0, 0.2);
--fds-black-alpha-30: rgba(0, 0, 0, 0.3);
--fds-black-alpha-40: rgba(0, 0, 0, 0.4);
<touchégg>
<settings>
<property name="composed_gestures_time">0</property>
</settings>
<application name="All">
<gesture type="TAP" fingers="2" direction="UNKNOWN">
<action type="MOUSE_CLICK">undefined</action>
</gesture>
<gesture type="TAP" fingers="3" direction="UNKNOWN">
<action type="MOUSE_CLICK">undefined</action>