Skip to content

Instantly share code, notes, and snippets.

View Jeffliu's full-sized avatar

Jeff Liu Jeffliu

View GitHub Profile
@Jeffliu
Jeffliu / webhook.gs
Created November 7, 2020 07:52 — forked from lifehome/webhook.gs
Google Forms + Webhook : JSON example
function onFormSubmit(e) {
var data = {
"form": {
"id": e.source.getId(),
"title": e.source.getTitle() ? e.source.getTitle() : "Untitled Form",
"is_private": e.source.requiresLogin(),
"is_published": e.source.isAcceptingResponses(),
},
"response": {
"id": e.response.getId(),
@Jeffliu
Jeffliu / s3-curl-backups.md
Created February 21, 2018 08:37 — forked from jareware/s3-curl-backups.md
Simple, semi-anonymous backups with S3 and curl

⇐ back to the gist-blog at jrw.fi

Simple, semi-anonymous backups with S3 and curl

Backing stuff up is a bit of a hassle, to set up and to maintain. While full-blown backup suites such as duplicity or CrashPlan will do all kinds of clever things for you (and I'd recommend either for more complex setups), sometimes you just want to put that daily database dump somewhere off-site and be done with it. This is what I've done, with an Amazon S3 bucket and curl. Hold onto your hats, there's some Bucket Policy acrobatics ahead.

There's also a tl;dr at the very end if you just want the delicious copy-pasta.

Bucket setup

@Jeffliu
Jeffliu / gist:a97ef7ec103915f34a5e
Last active August 29, 2015 14:05
Enable Xdebug with Intellij IDEA on Mac OSX
Install Xdebug for php5.4 without php installation (if php is already installed)
brew tap josegonzalez/homebrew-php
brew install php54-xdebug --without-homebrew-php
Add Xdebug to installed php:
sudo mkdir -p /Library/Server/Web/Config/php
cd /Library/Server/Web/Config/php
sudo ln -s /usr/local/etc/php/5.4/conf.d/ext-xdebug.ini ext-xdebug.ini
@Jeffliu
Jeffliu / gist:6414883
Last active December 22, 2015 04:09
Make Scribed on Mac OSX 10.8
(See http://jonstefansson.blogspot.jp/2010/05/installing-scribe-on-mac-os-x.html)
How to install scribe on Mac OSX.
1) Install thrift/fb303.
edit fb303 to make it work on Mac OSX 10.8: https://github.com/facebook/scribe/issues/36#issuecomment-2699027
2) Install scribe: