Skip to content

Instantly share code, notes, and snippets.

@antonmry
antonmry / litra-auto-on.plist
Last active February 26, 2024 13:08
This is script to auto on/off a Logitech light when the webcam is on/off in Mac. It requires hidapitester
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>litra-auto-on</string>
<key>ProgramArguments</key>
<array><string>/Library/LaunchDaemons/litra-auto-on.sh</string></array>
<key>RunAtLoad</key>
<true/>
@ScottMaclure
ScottMaclure / slack_draft_deleter.js
Last active April 23, 2024 15:49
Slack Draft Deleter
// Remove all drafts from your drafts view
// Navigate to drafts
// F12 to raise dev console
// Paste the below
(async function(x) {
for (let e = document.querySelector('[type="trash"]'); e != null; e = document.querySelector('[type="trash"]')) {
e.click();
await new Promise(resolve => setTimeout(resolve, 500))
document.querySelector('[data-qa="drafts_page_draft_delete_confirm"]').click();
await new Promise(resolve => setTimeout(resolve, 1500))
@metafloor
metafloor / zpl-quick-reference.md
Last active April 19, 2024 17:24
ZPL Quick Reference

ZPL Commands

Command Format Description
^A ^Afo,h,w,d:f.x Use Scalable/Bitmapped Font
^A@ ^A@o,h,w,d:f.x Use Font Name to Call Font
^B0 ^B0a,b,c,d,e,f,g Aztec Bar Code Parameters
^B1 ^B1o,e,h,f,g Code 11 Bar Code
^B2 ^B2o,h,f,g,e,j Interleaved 2 of 5 Bar Code
^B3 ^B3o,e,h,f,g Code 39 Bar Code
@edudobay
edudobay / git-branch-protection.md
Last active June 27, 2023 13:02
Command-line script for protecting/unprotecting branches in a GitHub repository

(To be improved)

Requirements

  • httpie (which provides the http command) — pip install httpie

Setup

  • Save the git-branch-protection.sh as git-branch-protection somewhere in your path (something like ~/bin or ~/.local/bin if you already use it)
  • Generate a GitHub token and save it as ~/.config/github_token.
@arambadk
arambadk / migrate_pycrypto_to_cryptography.md
Created March 21, 2018 00:00
Migrating from pycrypto to cryptography

I used pycrypto in my projects before but since the project is no longer under active development it is highly recommended to move to cryptography.

I faced some difficulty during this migration so I am documenting my solution to help others.

This is how my pycrypto code to get pem encoded key looked like

from Crypto.IO import PKCS8
from Crypto.IO import PEM

def key_stuff(key_file=None):

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2024 06:36
A badass list of frontend development resources I collected over time.
@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.