Skip to content

Instantly share code, notes, and snippets.

View JayGoldberg's full-sized avatar

Jay Goldberg JayGoldberg

  • Google
  • San Francisco, CA, USA
View GitHub Profile
@mderazon
mderazon / export-to-csv.gs
Last active April 2, 2024 22:25
Google apps script to export to individual csv files all sheets in an open spreadsheet
/*
* script to export data in all sheets in the current spreadsheet as individual csv files
* files will be named according to the name of the sheet
* author: Michael Derazon
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}];
ss.addMenu("csv", csvMenuEntries);
@bathizte
bathizte / lighttpd_transmission_proxy.conf
Last active July 2, 2025 06:16
Lighttpd CORS reverse proxy for transmission
# Lighttpd as a CORS reverse proxy to Transmission XML-RPC API
server.modules = (
"mod_rewrite",
"mod_setenv",
"mod_proxy"
)
server.document-root = "/var/www"
# CORS preflighted request (HTTP OPTIONS) not handled yet by Transmission : Emulate a 200 OK
$HTTP["request-method"] =~ "^OPTIONS$" {
@addyosmani
addyosmani / LICENSE.txt
Last active April 8, 2024 20:15 — forked from 140bytes/LICENSE.txt
Offline Text Editor in < 140 bytes (115 bytes). Powered by localStorage & contentEditable
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Copyright (C) 2014 ADDY OSMANI <addyosmani.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@iwater
iwater / ir.js
Created July 27, 2014 14:33
use Espruino to control Sony TV
var get16BitsComplement = function (number) {
return number;
};
var factor = 1000;
var headerBytes = [2400 / factor, get16BitsComplement(-600 / factor)];
var oneOnDuration = 1200 / factor;
var zeroOnDuration = 600 / factor;
var offDuration = get16BitsComplement(-600 / factor);
var repeatDuration = get16BitsComplement(-25700 / factor);
@anytizer
anytizer / qr code generators.txt
Created July 30, 2014 05:43
List of online QR Code Generators
http://qrdroid.com/generate/
https://chrome.google.com/webstore/detail/the-qr-code-generator/s
http://www.waspbarcode.com/qr-code-generator
http://www.visualead.com/qurify2/
http://www.visualead.com/qr-code-generator/
http://delivr.com/qr-code-generator
https://scan.me/qr-code-generator
http://qrcode.littleidiot.be/
http://www.qrcode-monkey.com/
https://www.unitag.io/qrcode
@terrywbrady
terrywbrady / GoogleSpreadsheet.html
Last active February 28, 2025 09:00
Sample HTML/JS to parse a Google Spreadsheet
<!doctype html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var spData = null;
function doData(json) {
spData = json.feed.entry;
}
@mogsdad
mogsdad / Apps Script pdfToText utility.md
Last active May 22, 2025 15:34
For http://stackoverflow.com/questions/26613809, a question about getting pdf attachments in gmail as text. I got a little carried away - this does much more than asked.

Google Apps Script pdfToText Utility#

This is a helper function that will convert a given PDF file blob into text, as well as offering options to save the original PDF, intermediate Google Doc, and/or final plain text files. Additionally, the language used for Optical Character Recognition (OCR) may be specified, defaulting to 'en' (English).

Note: Updated 12 May 2015 due to deprecation of DocsList. Thanks to Bruce McPherson for the getDriveFolderFromPath() utility.

    // Start with a Blob object
    var blob = gmailAttchment.getAs(MimeType.PDF);
    
#!/bin/sh
# NAME
# pgrep, pkill - find or signal processes by name and other attributes
#
# SYNOPSIS
# pgrep [-glpfao] pattern
# pkill [-glpfao] [-s SIG] pattern
#
# DESCRIPTION
@spikedrba
spikedrba / pmd.py
Last active August 13, 2021 17:42
RPi Motion detection with picamera python lib
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This script was originally created by by killagreg î Thu Dec 18, 2014 7:53 am
# see http://www.raspberrypi.org/forums/viewtopic.php?p=656881#p656881
# This script implements a motion capture surveillance cam for raspberry pi using picam
# and is based on the picamera python library.
# It uses the "motion vectors" magnitude of the h264 hw-encoder to detect motion activity.
@pjaton
pjaton / gyndns
Last active March 23, 2021 07:58
A bash script to update a dynamic DNS entry on Google Domain using their provided API.
#!/bin/bash
#
# Copyright 2015-present Patrice Jaton.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#