Skip to content

Instantly share code, notes, and snippets.

@micksmix
micksmix / userChrome.css
Created June 23, 2023 18:05 — forked from hallettj/userChrome.css
Customize Firefox Quantum to hide tab bar, and to hide navigation bar when it is not focused. Press Ctrl+L to reveal navigation bar. To make this work you must open about:config and set toolkit.legacyUserProfileCustomizations.stylesheets to true with. This version is tested with Firefox v78.
@-moz-document url(chrome://browser/content/browser.xul),
url(chrome://browser/content/browser.xhtml) {
/* hide horizontal tabs at the top of the window */
#TabsToolbar > * {
visibility: collapse;
}
/* hide navigation bar when it is not focused; use Ctrl+L to get focus */
#main-window:not([customizing]) #navigator-toolbox:not(:focus-within):not(:hover) {
@micksmix
micksmix / remove_tmp_containers.py
Last active August 27, 2023 16:11
Removes temporary containers in firefox
#!/usr/bin/env python3
"""
This script is designed to help users find their Firefox profiles and create
a backup of the `containers.json` file, especially if they use the 'Temporary Containers' extension.
Once the user selects the desired profile using arrow keys, the script does the following:
1. Identifies and removes any 'Temporary Containers' entries (those starting with 'tmp') from the `containers.json` file.
2. Creates a backup of the original `containers.json` file. If a backup already exists, it appends a timestamp to the new backup to avoid overwrites.
3. Overwrites the `containers.json` file with the cleaned data.
@micksmix
micksmix / heic_to_jpeg.sh
Created September 7, 2022 04:02 — forked from ccnokes/heic_to_jpeg.sh
Bash script that converts .HEIC to .jpg files
#!/bin/bash
set -eu -o pipefail
count=$(find . -depth 1 -name "*.HEIC" | wc -l | sed 's/[[:space:]]*//')
echo "converting $count files .HEIC files to .jpg"
magick mogrify -monitor -format jpg *.HEIC
echo "Remove .HEIC files? [y/n]"
@micksmix
micksmix / download-redfin-pictures.sh
Last active September 5, 2022 17:37
given a redfin home url, download all pictures
#!/usr/bin/env bash
while getopts u: flag
do
case "${flag}" in
u) url=${OPTARG};;
esac
done
wget --user-agent="Mozilla" -O - $url | egrep -o "https:\\\\u002F\\\\u002Fssl.cdn-redfin.com\\\\u002Fphoto\\\\u002F\d*\\\\u002Fbigphoto\\\\u002F\d*\\\\u002F[A-Z0-9_]*.jpg" | ascii2uni -Z '\u%04X' | xargs wget --user-agent="Mozilla"
@micksmix
micksmix / aws_cli_pyenv
Created August 19, 2020 19:42 — forked from sjjohansen/aws_cli_pyenv
Adding AWS CLI in Python Virtualenv on MacOS X
# create a directory for you Python Virtual Environments
mkdir -p ~/pyenvs
# create one for the AWS cli then install the CLI
virtualenv ~/pyenvs/aws
~/pyenvs/aws/bin/pip install awscli
~/pyenvs/aws/bin/pip install boto
@micksmix
micksmix / lastpass2fflockwise.py
Last active April 14, 2020 20:25
Move *some* LastPass data into Firefox Lockwise
#!/usr/bin/env python2
# NOTE: This requires Python2
#
# I forked this gist, and modified it to be able to
# parse a LastPass CSV export and import it into
# Firefox Lockwise
# https://gist.github.com/rfk/916d9ca684f862b1c1030c685a5a4d19
#
# Use this script like so:
#
#
# This is a little script to populate Firefox Sync with
# fake password records. Use it like so:
#
# $> pip install PyFxA syncclient cryptography
# $> python ./upload_fake_passwords.py 20
#
# It will prompt for your Firefox Account email address and
# password, generate and upload 20 fake password records, then
# sync down and print all password records stored in sync.
@micksmix
micksmix / burp-random
Last active December 31, 2019 01:46
random Burp setup and plugin information
# Get Firefox Developer Edition
```
wget --content-disposition "https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=osx&lang=en-US"
wget --content-disposition "https://download.mozilla.org/?product=firefox-devedition-latest-ssl&os=linux64&lang=en-US"
wget --content-disposition "https://download.mozilla.org/?product=firefox-devedition-stub&os=win&lang=en-US"
```
Create a new Firefox Developer Edition profile and use user.js from the link below:
- https://bitbucket.org/mrbbking/quieter-firefox/src/master/
```
@micksmix
micksmix / runchrome.sh
Last active February 4, 2020 04:35
chromium-launch
#!/usr/bin/env bash
chromium --no-sandbox --password-store=basic --user-data-dir=~/.config/chromium -ignore-certificate-errors  --disable-xss-auditor  --no-default-browser-check  --no-first-run  --disable-background-networking  --disable-client-side-phishing-detection  --disable-component-update  --disable-sync  --disable-translate  --disable-web-resources  --safebrowsing-disable-auto-update  --safebrowsing-disable-download-protection &
#alias chromeburp='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --no-sandbox --password-store=basic --ignore-certificate-errors --disable-xss-auditor --no-default-browser-check --no-first-run --disable-background-networking --disable-client-side-phishing-detection --disable-component-update --disable-sync --disable-translate --disable-web-resources --safebrowsing-disable-auto-update --safebrowsing-disable-download-protection &'
@micksmix
micksmix / clrtmp.bat
Created November 13, 2018 07:05
Batch file to clear out temp files on Windows
REM clrtmp.bat
@echo off
del "%TEMP%\*.*" /s /f /q
for /d %%d in (%TEMP%\*) do rmdir "%%d" /s /q
del "%WINDIR%\TEMP\*.*" /s /f /q
for /d %%d in (%WINDIR%\TEMP\*) do rmdir "%%d" /s /q