Skip to content

Instantly share code, notes, and snippets.

/**
* Unpivot a pivot table of any size.
*
* @param {A1:D30} data The pivot table.
* @param {1} fixColumns Number of columns, after which pivoted values begin. Default 1.
* @param {1} fixRows Number of rows (1 or 2), after which pivoted values begin. Default 1.
* @param {"city"} titlePivot The title of horizontal pivot values. Default "column".
* @param {"distance"[,...]} titleValue The title of pivot table values. Default "value".
* @return The unpivoted table
* @customfunction
@RadGH
RadGH / js-local-storage.js
Last active January 7, 2020 06:15
JavaScript storage using localstorage with Get, Set, Delete. Falls back to 30-day cookies if LocalStorage is not supported.
// Usage:
cache.set('name', 'Radley');
alert( cache.get('name') ); // Displays "Radley"
cache.delete('name');
alert( cache.get('name') ); // Displays ""
// End of usage. Note that this code must go below the actual cache definition (below)
@saas786
saas786 / r-debug.php
Created October 31, 2019 10:02 — forked from Rarst/r-debug.php
R Debug (set of dump helpers for debug)
<?php
/*
Plugin Name: R Debug
Description: Set of dump helpers for debug.
Author: Andrey "Rarst" Savchenko
Author URI: https://www.rarst.net/
License: MIT
*/
@damiencarbery
damiencarbery / flash-animation.css
Last active December 10, 2021 14:03
Edit stock levels in WooCommerce - Add editing capability to the List stock levels in WooCommerce plugin - https://www.damiencarbery.com/2019/10/edit-stock-levels-in-woocommerce
table.wp-list-table tr.updated { animation: highlight 3s ease 2; }
@keyframes highlight {
0% { background-color: inherit; }
50% { background-color: #d1fa88; }
100% { background-color: inherit; }
}
@jagdeepsingh
jagdeepsingh / README.md
Last active February 4, 2025 20:31
Set up macOS Catalina 10.15 with development tools | Git | Homebrew | rbenv | bundler | Atom | Databases | Node.js | Yarn | kubectl | Elastic Stack
@ziadoz
ziadoz / main.go
Last active June 5, 2021 21:11
Download a webpage as HTML with base64 encoded assets using Golang
// Usage: go run main.go https://www.theguardian.com/uk
// Based on Monolith: https://github.com/Y2Z/monolith
package main
import (
"bytes"
"encoding/base64"
"fmt"
"io"
"io/ioutil"
@richardblondet
richardblondet / README.md
Last active February 13, 2025 05:58
Create a simple API backend with Google App Script and a Spreadsheet

Google App Script CRUD

Inspired by this gist.

Getting Started

  1. Create a new App Script project.
  2. Paste the content of the file google-app-script-crud.gs in the default Code.gs file.
  3. Create a new Spreadsheet.
  4. Copy the Spreadsheet ID found in the URL into the variable SHEET_ID located in line 1 of your file.
@kenichimiki
kenichimiki / sendgrid-api.php
Created July 27, 2019 00:18
PHP script for Inbound Email Parse Webhook of SendGrid
<?php
/*************************************************************************
* sendgrid-api (MAIN)
* Home Tools for private. Using IFTTT and Google Home etc
*
* PHP 5 or later
*
* @category Home IoT
* @author Miki
* @url https://www.miki-ie.com/
@DevinWalker
DevinWalker / resize_local_machine.sh
Created July 23, 2019 23:00 — forked from claygriffiths/resize_local_machine.sh
Resize Local by Flywheel VirtualBox image
# Steps we will take:
# 1. Change Local (Docker Machine) image type (this will take a bit)
# 2. Resize image
# 3. Resize partion
#
# Also see: https://docs.docker.com/articles/b2d_volume_resize/
# IMPORTANT: Make sure Local is not running!
VM_NAME="local-by-flywheel"
NEW_DISK_SIZE=50000
@matthewjberger
matthewjberger / ConvertToExe.txt
Last active July 20, 2020 04:43
A GUI in Powershell
.\ps2exe.ps1 ..\form.ps1 -outputFile output.exe -requireAdmin -noConfigFile -noConsole -noError -nooutput -x64 -runtime40
from
https://gallery.technet.microsoft.com/scriptcenter/PS2EXE-GUI-Convert-e7cb69d5