Skip to content

Instantly share code, notes, and snippets.

View bdombro's full-sized avatar

Brian Dombrowski bdombro

View GitHub Profile
#!/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
<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>
#!/bin/bash
echo "
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).
Follow the original instructions from the encryption output at the end of the process: the target user should test if he/she can log in before the restart.
After setting encrypted home(s), a restart is advised.
#!/bin/bash
echo "
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).
Follow the original instructions from the encryption output at the end of the process: the target user should test if he/she can log in before the restart.
After setting encrypted home(s), a restart is advised.
#!/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
// 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);
@bdombro
bdombro / touchegg.xml
Created January 9, 2022 17:55
touchegg config
<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>