calendarID from cal.csv
can be used at path param in
https://developers.google.com/calendar/v3/reference/calendars/get
https://developers.google.com/calendar/v3/reference/events/list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Complete mapping of ISO 3166 2-letter country codes to descriptions used in Google calendar URLs, accurate as of 29 July 2021. | |
iso_to_gcal_description = { | |
"ad": "ad", | |
"ae": "ae", | |
"af": "af", | |
"ag": "ag", | |
"ai": "ai", | |
"al": "al", | |
"am": "am", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"Country": { | |
"Name": "Afghanistan", | |
"ISOCode": "AF", | |
"ISONumeric": "4" | |
}, | |
"Ambulance": { | |
"All": [ | |
"112" |
REST API response format based on some of the best practices
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Adds a team to all the repos in a Github organization. This is a tedious | |
* process in the UI. You'll need a newer version of node to run this (e.g 9+) | |
* because it uses async/await. | |
* | |
* Instructions: | |
* | |
* 1. Copy this file somewhere on your computer, e.g. ~/addteamrepos.js | |
* 2. Fill in the uppercase variables below with the right values | |
* 3. Run this file: `$ node ~/addteamrepos.js` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Common | |
{ | |
/*--------------------- $_GET & $_POST ----------------- START */ | |
/** | |
* Get $_GET content, array or array item in filtered way | |
* | |
* @param object $parameter could be array or array item |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Enqueue custom fonts using protocol relative URL. | |
* | |
* Syntax: wp_enqueue_style( $handle, $src, $deps, $ver, $media ); | |
* Ensure $handle is unique to prevent conflicts with plugins | |
* | |
* Note(s): The pipe (|) operator is used to load multiple typefaces in a single call. We also only load the weights we want * by comma seperating them, instead of loading every available weight. | |
*/ | |
function theme_prefix_fonts() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'acf/get_valid_field', 'change_post_content_type'); | |
function change_post_content_type( $field ) { | |
if($field['type'] == 'wysiwyg') { | |
$field['tabs'] = 'visual'; $field['toolbar'] = 'basic'; $field['media_upload'] = 0; | |
} | |
return $field; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!function_exists('get_theme_file_uri')){ | |
function get_theme_file_uri( $file = '' ) { | |
$file = ltrim( $file, '/' ); | |
if ( empty( $file ) ) { | |
$url = get_stylesheet_directory_uri(); | |
} elseif ( file_exists( get_stylesheet_directory() . '/' . $file ) ) { | |
$url = get_stylesheet_directory_uri() . '/' . $file; | |
} else { | |
$url = get_template_directory_uri() . '/' . $file; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"il": "Adana", | |
"plaka": 1, | |
"ilceleri": [ | |
"Aladağ", | |
"Ceyhan", | |
"Çukurova", | |
"Feke", | |
"İmamoğlu", |
NewerOlder