Skip to content

Instantly share code, notes, and snippets.

View warengonzaga's full-sized avatar
🤫
Building in Silence

Waren Gonzaga warengonzaga

🤫
Building in Silence
View GitHub Profile
@thepushkarp
thepushkarp / cursor_copilot_sync.py
Created November 4, 2024 06:38
Cursor and Copilot Instruction File Synchronization Script.
#!/usr/bin/env python3
"""
Cursor and Copilot Instruction File Synchronization Script.
Synchronizes instruction files between Cursor and GitHub Copilot by copying contents
between .cursorrules and .github/copilot-instructions.md files.
Requirements:
- Python 3.6+ (uses f-strings)
- No external dependencies required (uses only standard library)
@tylermorganwall
tylermorganwall / submarine_cable_map.R
Last active May 5, 2025 22:17
Submarine Cable Map Dataviz
library(geojsonsf)
library(sf)
library(rayrender)
#Data source: https://github.com/telegeography/www.submarinecablemap.com
cables = geojson_sf("cable-geo.json")
cablescene = list()
counter = 1
for(i in 1:length(cables$geometry)) {
@wpsunshine
wpsunshine / gf-enhanced-ui-list-select.js
Last active March 28, 2024 17:03
Gravity Forms use enhanced UI on select drop down for lists
<script>
// For standard forms
jQuery( document ).on( 'gform_post_render', function( event, form_id, current_page ){
gformInitChosenFields( '#field_12_10 select', 'No results matched' ); // Change selector to #field_FORMID_FIELDID
});
// Forms that use multiple pages and ajax
jQuery( document ).on( 'gform_page_loaded', function( event, form_id, current_page ){
gformInitChosenFields( '#field_12_10 select', 'No results matched' ); // Change selector to #field_FORMID_FIELDID
});
</script>
@Maxr1998
Maxr1998 / todoist-cleaner.py
Last active December 8, 2024 19:31
Python script to delete completed tasks from your Todoist Inbox
import todoist
api = todoist.TodoistAPI(token='<your_token_here')
# Initial sync of your account
api.sync()
# Find Inbox in project - can be adapted to delete completed tasks for other projects as well
projects = api.projects.all()
inbox = next(p for p in projects if 'inbox_project' in p)
Rank Type Prefix/Suffix Length
1 Prefix my+ 2
2 Suffix +online 6
3 Prefix the+ 3
4 Suffix +web 3
5 Suffix +media 5
6 Prefix web+ 3
7 Suffix +world 5
8 Suffix +net 3
9 Prefix go+ 2
@p0bailey
p0bailey / covid19-tmux-dashboard.md
Last active April 17, 2020 19:33
Covid19 Tmux Dashboard
@zackkatz
zackkatz / gravityview-change-entry-approval-default.php
Last active June 29, 2022 06:37
GravityView - Change default entry approval status
<?php
/**
* When a new entry is created in Gravity Forms, set the default status to Approved
*
* Note: Requires GravityView 2.0.14 or newer
*
* @return int The value for "Approved" status is 3
*/
add_filter( 'gravityview/approve_entries/after_submission/default_status', function( $default_status ) {
@cristacheda
cristacheda / Advanced Custom Fields repeater values to a Gravity Forms dropdown field.md
Last active August 26, 2022 03:47
Populate Gravity Forms dropdown field with Advanced Custom Fields repeater values.

Add Advanced Custom Fields repeater values to a Gravity Forms dropdown field

The code should be added in a separate file and then included in your functions.php using require.

Replace 1 from the code with the ID of the form that you want to dinamically populate with field values from ACF. You can find more info about the filters in the Gravity Forms documentation.

add_filter( 'gform_pre_render_1', 'populate_dropdown' );
add_filter( 'gform_pre_validation_1', 'populate_dropdown' );
add_filter( 'gform_admin_pre_render_1', 'populate_dropdown' );
add_filter( 'gform_pre_submission_filter_1', 'populate_dropdown' );
// Discord all events!
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!)
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client
// Learn from this, do not just copy it mofo!
//
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584
// Last Updated -> Halloween 2022
/*
@justjanne
justjanne / Price Breakdown.md
Last active April 5, 2025 08:10 — forked from kylemanna/price.txt
Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Permalink: git.io/vps

$5/mo

Provider Type RAM Cores Storage Transfer Network Price