Skip to content

Instantly share code, notes, and snippets.

View warengonzaga's full-sized avatar

Waren Gonzaga warengonzaga

View GitHub Profile
@tylermorganwall
tylermorganwall / submarine_cable_map.R
Last active April 19, 2024 07:36
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 February 21, 2023 13:18
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 11, 2024 22:21 — 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
@spivurno
spivurno / gw-gravity-forms-force-default-value.php
Last active October 20, 2021 10:42
Gravity Wiz // Gravity Forms // Force Default Value
<?php
/**
* WARNING! THIS SNIPPET MAY BE OUTDATED.
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library:
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-force-default-value.php
*/
/**
* Gravity Wiz // Gravity Forms // Force Default Value
*
* Force the default value to be captured for fields hidden by conditional logic.