Skip to content

Instantly share code, notes, and snippets.

Working from home

Michele Venturi dardo82

Working from home
View GitHub Profile
coolaj86 /
Last active Aug 9, 2022
MacOS Default Icons Locations

How to Find ANY Icon

  1. Open the application such that you see the icon on your screen.
  2. Open Activity Monitor
  3. Double click the name of the application (i.e. Finder or System Preferences)
  4. Select "Open Files and Ports"
  5. Copy the output to a file and then grep for .icns

Similarly you could run this command, but it may take several minutes to complete:

jnaecker /
Last active Jan 28, 2022
Using Overleaf as your TeX editor but getting your files to Github

git + overleaf + github


Connect Overleaf and your local repo

  1. Make a new project on Overleaf.
  2. In the share menu, copy the link from "Clone with git"
  3. On your computer:
    • use cd to navigate to where you want to put your project
fallroot /
Created Aug 7, 2017
Manipulating Property List in macOS Command Line

Manipulating Property List in macOS Command Line


⚠️ defaults 명령어는 홈 경로(~)는 인식하지만 상대 경로(., ..)는 인식하지 않는다.

vishwanath79 /
Last active May 9, 2019
Install OpenCV on Mac OS Sierra on Python 3.5
# 1. Download and install the latest Anaconda distribution from
# 2. Create a new Python environment. Make sure you choose python 3.5 as your python version for the virtual environment:
conda create -n myenv python=3.5
# 3. Activate the new environment using:
source activate myenv
Tithen-Firion / openload.js
Last active Nov 20, 2021
Openload: extract download URL using PhantomJS
View openload.js
// Usage: phantomjs openload.js <video_url>
// if that doesn't work try: phantomjs --ssl-protocol=any openload.js <video_url>
var separator = ' | ';
var page = require('webpage').create(),
system = require('system'),
id, match;
if(system.args.length < 2) {
console.error('No URL provided');
scottopell /
Last active Sep 28, 2022
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

Disk Utility is unable to repair this at first, but the fix is this:

  1. Use diskutil list to find the right drive id.
  2. You want the id under the IDENTIFIER column, it should look like disk1s1
  3. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  4. -d is debug so you'll see all your files output as they're processed.
  5. Answer YES if it gives you the prompt Main boot region needs to be updated. Yes/No?
misterch0c / pamcam
Last active Jan 12, 2022
Take a screenshot when someone enters a wrong password
View pamcam
# Jump two rules if login succeeds.
auth [success=2 default=ignore] nullok_secure
auth optional /home/
auth requisite
# User gets here if authentication is successful. No denying, no cam module.
auth required try_first_pass nullok
kastnerkyle /
Last active Dec 1, 2021
Install speech toolkit and create features
from __future__ import print_function
import subprocess
import shutil
import os
import stat
import time
# This script looks extremely defensive, but *should* let you rerun at
# any stage along the way. Also a lot of code repetition due to eventual support
# for "non-blob" install from something besides the magic kk_all_deps.tar.gz
edenwaith / CountOpenSafariTabs.scpt
Last active Apr 8, 2022
AppleScript: Count the number of open tabs in Safari
View CountOpenSafariTabs.scpt
-- CountOpenSafariTabs.scpt
-- Author: Chad Armstrong
-- Date: 13 May 2016
-- Description: Count the number of open tabs in Safari
-- To run from CLI: osascript CountOpenSafariTabs.scpt
tell application "Safari"
set winlist to every window
import cv2
import numpy as np
from matplotlib import pyplot as plt
# Import our game board
canvas = cv2.imread('./data/box_med.jpg')
# Import our piece (we are going to use a clump for now)
piece = cv2.imread('./data/piece_small.jpg')
# Pre-process the piece