Skip to content

Instantly share code, notes, and snippets.

@nov1n
nov1n / nvimbak.sh
Created January 1, 2025 12:46
Bash script to launch Neovim from a working backup configuration
#!/usr/bin/env bash
# nvimbak
#
# Description:
# This script creates a backup of the user's dotfiles directory and starts
# Neovim with the backup configuration. The backup directory and any submodules
# are reset to the latest Git commit - which is assumed to be working.
#
# NEOVIM_ARGS: Optional arguments to pass to Neovim. These arguments will be
@deanishe
deanishe / workflow-build.py
Last active January 1, 2025 23:26
Build Alfred Workflows into .alfredworkflow (zip) files
#!/usr/bin/python
# encoding: utf-8
#
# Copyright (c) 2013 [email protected].
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
# Created on 2013-11-01
#
@dansleboby
dansleboby / get_subtitle_files.js
Last active January 1, 2025 23:23
Suno.com Aligned Words Fetcher to SRT or LRC file
// ==UserScript==
// @name Suno Aligned Words Fetcher with Auth
// @namespace http://tampermonkey.net/
// @version 1.2
// @description Fetch aligned words with auth and add a button under the image on Suno pages.
// @author Your Name
// @match https://suno.com/song/*
// @grant none
// ==/UserScript==
@jacobtomlinson
jacobtomlinson / .gitignore_global
Created August 18, 2017 10:08
An example global gitignore file
# An example global gitignore file
#
# Place a copy if this at ~/.gitignore_global
# Run `git config --global core.excludesfile ~/.gitignore_global`
# Compiled source #
###################
*.com
*.class
*.dll
@rymawby
rymawby / stripe-credit-card-numbers.md
Last active January 1, 2025 23:19
Stripe test credit card numbers for use in development

Test credit card numbers to use when developing with Stripe

4242424242424242 Visa

4012888888881881 Visa

4000056655665556 Visa (debit)

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active January 1, 2025 23:17
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active January 1, 2025 23:14
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@usagimaru
usagimaru / HiddenMacOSDebuggingPanel.md
Last active January 1, 2025 23:12
Enables useful debugging panel in macOS apps

Use _NS_4445425547 or NS🐞 for enables debuggging panel. When enabled it, a ladybug 🐞 menu appears in the app menu bar.

“4445425547” means DEBUG in Unicode table.

0x44=D
0x45=E
0x42=B
0x55=U
0x47=G

/*
Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleNotify.cpp
Ported to Arduino ESP32 by Evandro Copercini
Create a BLE server that, once we receive a connection, will send periodic notifications.
The service advertises itself as: 6E400001-B5A3-F393-E0A9-E50E24DCCA9E
Has a characteristic of: 6E400002-B5A3-F393-E0A9-E50E24DCCA9E - used for receiving data with "WRITE"
Has a characteristic of: 6E400003-B5A3-F393-E0A9-E50E24DCCA9E - used to send data with "NOTIFY"
The design of creating the BLE server is:
@johndturn
johndturn / launchd-for-services.md
Last active January 1, 2025 23:07
Overview of using launchd to set up services on a macOS machine.

launchd - Script Management in macOS

What is it?

  • Used on macOS for managing agents and daemons and can be used to run scripts at specified intervals
    • macOS's competitor to cron, along with other things
  • Runs Daemons and Agents

What is a Daemon?