Skip to content

Instantly share code, notes, and snippets.

@tanaikech
tanaikech / submit.md
Created December 12, 2024 03:07
Workaround: Export web-published Google Docs as PDFs using Google Apps Script

Workaround: Export web-published Google Docs as PDFs using Google Apps Script

Abstract

This report outlines a Google Apps Script solution for directly exporting web-published Google Docs to PDF. By circumventing limitations in published URLs, the script enables convenient PDF generation without manual intervention.

Introduction

Google Sheets and Google Docs offer the convenient feature of web publishing, providing readily accessible URLs for sharing. Ref

@jpluimers
jpluimers / forecast.php
Created December 11, 2024 14:11 — forked from macsplit/forecast.php
Get Weather from 7Timer!
<?php
date_default_timezone_set('UTC');
$lon = "-0.19759370325694858";
$lat = "51.35956063540873";
$url = "https://www.7timer.info/bin/civil.php?lon=$lon&lat=$lat&unit=metric&ac=0&output=json";
$weathers = [
@eddy-22
eddy-22 / tempmail.sh
Created December 6, 2024 21:46 — forked from xpepper/tempmail.sh
A shell script to create a temporary disposable email via command line (install w3m, curl, jq)
#!/usr/bin/env sh
#
# by Siddharth Dushantha 2020
#
# Dependencies: jq, curl, w3m
#
version=1.1.9
# By default 'tmpmail' uses 'w3m' as it's web browser to render
@jpluimers
jpluimers / .ignore
Created December 5, 2024 14:38 — forked from hereisderek/.ignore
my homebrew install list
dump.list
@tanaikech
tanaikech / submit.md
Created December 4, 2024 05:52
MimeTypeApp: Flexible MimeType Converter with Google Apps Script

MimeTypeApp: Flexible MimeType Converter with Google Apps Script

Abstract

This is a Google Apps Script library for converting files from various MIME types to a specified target MIME type. The library accepts both file IDs and blobs as input values.

Introduction

<!-- if( !empty($similar_properties) ) { -->
<div class="cw-similar-properties-wrapper">
<h3>Similar Properties</h3>
<?php echo do_shortcode( '[similar_properties property_id=' . $property->id . ' per_page="2" price_percentage_bounds="25"]' ); ?>
</div>
<!-- } -->
{
"RoleId": 17755331,
"PropertyId": 2259506,
"PropertyStyle": {
"Id": 1037302,
"Name": "Modern",
"SystemName": "Modern"
},
"Address": {
"OrganizationName": "",
<?php
function display_kitchensmart_gallery_shortcode( $atts ) {
ob_start();
$gal = shortcode_atts( array(
'id' => '',
'order' => 'DESC',
'category' => '',
'button_label' => '',
add_action("propertyhive_property_imported_dezrez_json", 'set_new_home_flag', 10, 2);
function set_new_home_flag($post_id, $property) {
wp_suspend_cache_invalidation(false);
wp_defer_term_counting(false);
wp_defer_comment_counting(false);
$flags = array();
if (isset($property['Descriptions']) && is_array($property['Descriptions']) && !empty($property['Descriptions'])) {
foreach ($property['Descriptions'] as $description) {
if (isset($description['StyleType']['SystemName']) && trim(strtolower($description['StyleType']['SystemName'])) == 'new') {
$flags[] = 69;