Skip to content

Instantly share code, notes, and snippets.

@yoginsurya
yoginsurya / brew_autoupdate.md
Last active February 27, 2026 18:14
Automate Homebrew updates on macOS using launchd. The update script runs daily at 6:00 AM.

Automated Homebrew Updates with launchd on macOS

This Gist provides a script and a launchd configuration file to automatically update Homebrew packages and casks on a daily schedule. It uses the macOS-native launchd system, which is more reliable than cron for systems that may be asleep during a scheduled run.

Setup Instructions

  1. Create the Script:
    • Place the update_brew.sh file in a directory within your user's home folder, such as ~/bin/.
    • Make the script executable by running (mkdir -p ~/bin if you do not have this directory):
@lopspower
lopspower / README.md
Last active March 15, 2026 13:45
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

@full-stack-king
full-stack-king / gv-copy-.js
Created January 7, 2016 16:06
Gravity Form copy form fields (Eg: same as billing address check box for shipping address )
function bindGformHandlers() {
//bind the click function
$(document).on('click', '.fill-check input', function() {
if($(this).is(':checked')) {
//put in the selectors we fill from
var fill_from = $('.fill-from, .fill-from .name_last, .fill-from .name_first');
fill_from.each(function() {
//get the label
@ygotthilf
ygotthilf / jwtRS256.sh
Last active February 10, 2026 20:17
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@robflaherty
robflaherty / csv-to-json.php
Created September 1, 2011 02:26
Convert CSV to JSON
<?php
/*
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on php.net
*/
header('Content-type: application/json');
// Set your CSV feed