Skip to content

Instantly share code, notes, and snippets.

View dougbacelar's full-sized avatar

Doug Bacelar dougbacelar

View GitHub Profile
dougbacelar / jpdb-deck-review.js
Last active April 23, 2024 00:14
more convenient way to mark easy words as 'Never Forget' when starting to study on jpdb.
const targetNode = document.querySelector("div.vocabulary-list");
const config = { attributes: false, childList: true, subtree: true };
const handleMutations = function (mutationsList) {
for (const mutation of mutationsList) {
if (mutation.type === "childList") {
if (mutation.removedNodes.length > 0) {
console.log("appending buttons");
dougbacelar /
Last active April 19, 2024 04:55
general security tips for iOS devices

find my

The Find My app helps you locate and control your devices remotely.

  1. turn on the Find My iPhone setting. This will allow you to remotely lock, erase and locate your device.
  2. turn on Find My network option. This setting enables you to find your phone even if it does not have internet access or has been turned off. It uses bluetooth to ping other nearby devices its location.
  3. turn on Send Last Location to send the phone location to Apple before it runs out of battery

turn off access when locked

dougbacelar /
Created September 25, 2021 15:47
Take screenshot of specific window on MacOS with python
from Quartz import CGWindowListCopyWindowInfo, kCGNullWindowID, kCGWindowListOptionAll
import cv2 as cv
import numpy
from time import time
from PIL import Image
import os
windowId = None
windowName = 'Desktop'
dougbacelar / github-pr-untested-files.js
Last active June 20, 2019 09:04
Tampermonkey script to flag untested files on PR's
// ==UserScript==
// @name Github PR Untested Files
// @namespace
// @version 0.1
// @description Helps reviewing PR's
// @author Doug Bacelar
// @match*
// ==/UserScript==
'use es6';
dougbacelar / .bash_profile
Last active November 22, 2019 13:40
.bashrc file to add the git branch to the command line and git command aliases
if [ -f ~/.bashrc ]; then
. ~/.bashrc