This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zstyle ':omz:update' frequency 30 | |
# brew install trash | |
alias rm="trash $@" | |
alias vscode="open -a /Applications/Visual\ Studio\ Code.app $@" | |
export ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL=120; | |
export ANDROID_EMULATOR_CURRENT_AVD="Pixel_6_Pro_API_29" | |
alias emulator="$HOME/Library/Android/sdk/emulator/emulator -avd $ANDROID_EMULATOR_CURRENT_AVD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
import itertools | |
with open("wordlist_italian_licenseplate.txt", "w+") as wordlist_file: | |
for alfa1 in itertools.product(string.ascii_uppercase, string.ascii_uppercase): | |
alfa1_str = "".join(alfa1) | |
for digi in itertools.product(string.digits, string.digits, string.digits): | |
digi_str = "".join(digi) | |
for alfa2 in itertools.product(string.ascii_uppercase, string.ascii_uppercase): | |
wordlist_file.write(alfa1_str + digi_str + "".join(alfa2) + "\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pkgutil | |
from importlib import import_module | |
# Dynamically load submodules (subclass of BaseModule). | |
# Ref: https://www.bnmetrics.com/blog/dynamic-import-in-python3 | |
for _, name, _ in pkgutil.iter_modules([MODULES_PATH, PERSONAL_MODULES_PATH]): | |
try: | |
imported_module = import_module("." + name, package=__name__) | |
except ImportError: # ModuleNotFoundError: python 3.6+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Emoji | |
defaults write -g ApplePressAndHoldEnabled -bool true | |
# Screenshots | |
defaults write com.apple.screencapture disable-shadow -bool true | |
# Admins | |
sudo spctl --master-disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
launchctl unload /Library/LaunchAgents/com.microsoft.wdav.tray.plist | |
sudo launchctl unload /Library/LaunchDaemons/com.microsoft.fresno.plist | |
sudo launchctl unload /Library/LaunchDaemons/com.tanium.taniumclient.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# * * * CONFIGURE * * * | |
AP_INT="wlan0" | |
PROXY="192.168.200.1:8080" | |
# If the interface changes, remember to change those files: | |
# /etc/hostapd/hostapd.conf | |
# /etc/dnsmasq.conf | |
# /etc/network/interfaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asana | |
class AsanaScript: | |
def __init__(self, secret): | |
self.client = asana.Client.access_token(secret) | |
self.me = self.client.users.me() | |
# Prepare props | |
self.workspaces = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var FIRST_ROWS = 100; | |
var NON_WORKING_DAYS_BG = "#d9d9d9"; | |
function onOpen(e) { | |
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); | |
/* | |
First row is the header. | |
The cell A2 has the first day from which start the timesheet. | |
*/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import struct | |
import datetime | |
import binascii | |
from urllib.parse import quote_plus | |
# pip install pycryptodomex | |
from Cryptodome import Random | |
from Cryptodome.Cipher import AES |