This file contains hidden or 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
/** | |
* These simple triggers are available in Sheets, Docs, and Forms | |
* Most of this information can be found: | |
* https://developers.google.com/apps-script/guides/triggers/events | |
*/ | |
function onOpen(e) { | |
// { | |
// authMode: 'LIMITED', | |
// source: 'Spreadsheet' || 'Document' || 'Form', | |
// user: 'User' |
This file contains hidden or 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
unit Unit4; | |
interface | |
uses | |
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, | |
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, | |
FMX.Controls.Presentation, FMX.ScrollBox, FMX.Memo; | |
type |
This file contains hidden or 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
/* | |
PARAMS: | |
text XML (In this gist, namespace needs to be 'http://www.w3.org/1999/xhtml') | |
path XPATH (So far tested with simple indexed lookup /html/body/table[3]) | |
RETURNS: | |
Array[][] (Table data) | |
Missing th/thead/tfoot support | |
*/ |
This file contains hidden or 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
// Run from the dev tools console of any Youtube video | |
// Accurate as of July 2, 2020. | |
// | |
// Copy and paste this into the dev console in a browser with the desired video loaded. | |
// | |
// NOTE: Some Youtube videos do not directly expose the video url in the response. | |
// This script doesn't currently attempt to handle those. It will work for most other general video types though. | |
(async () => { | |
const html = await fetch(window.location.href).then((resp) => resp.text()).then((text) => text); |
This file contains hidden or 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
for src in *flac; do | |
dst="$(echo $src | sed -e 's/\.flac//' -e 's/ /_/g')".mp3 | |
ffmpeg -i "$src" -ab 320k "$dst" | |
operon clear -a "$dst" | |
operon copy "$src" "$dst" | |
done |
This file contains hidden or 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
#!/bin/bash | |
# Anh Nguyen <[email protected]> | |
# 2016-04-30 | |
# MIT License | |
# This script takes in same-size images from a folder and make a crossfade video from the images using ffmpeg. | |
# Make sure you have ffmpeg installed before running. | |
# The output command looks something like the below, but for as many images as you have in the folder. |
This file contains hidden or 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
// Takes and array of arrays matrix and return an array of elements. | |
function flatten(arrayOfArrays){ | |
return [].concat.apply([], arrayOfArrays); | |
} |
This file contains hidden or 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
/** | |
* Google Script - Add Fonts. | |
* Add other fonts in Google Spreadsheet. | |
* | |
* a) Open 'Script editor' | |
* b) Add this script | |
* c) Save and run 'onOpen' | |
* d) Go to some 'Spreadsheet' project | |
* e) Click to 'Font Editor' and then to 'Change Font' | |
*/ |
This file contains hidden or 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
2 - Autos & Vehicles | |
1 - Film & Animation | |
10 - Music | |
15 - Pets & Animals | |
17 - Sports | |
18 - Short Movies | |
19 - Travel & Events | |
20 - Gaming | |
21 - Videoblogging | |
22 - People & Blogs |
This file contains hidden or 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 the current cell is more than the previous cell, set it as lime green | |
function onEdit(e) { | |
var ss = SpreadsheetApp.getActive(); | |
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); | |
var name = sheet.getName(); | |
var range = sheet.getRange("A:J"); | |
var values = range.getValues(); | |
var cell = sheet.getActiveCell(); | |
var value = cell.getValue(); |