Skip to content

Instantly share code, notes, and snippets.

View Scarygami's full-sized avatar

Gerwin Sturm Scarygami

View GitHub Profile
(function (window) {
"use strict";
var audio, hangout_band, sounds;
sounds = {
// define various parameters for each note that can be played
};
function WebAudio() {
// all web audio API stuff handled here
<style>
.activities-widget {
display: inline-block !important;
padding: 5px !important;
width: 320px !important;
max-width: 320px !important;
margin: 2px !important;
border-radius: 5px !important;
overflow: hidden !important;
font-size: 13px !important;
<script src="https://apis.google.com/js/plusone.js"></script>
<div style="padding: 5px 0 0 15px !important;">
<div class="g-plus" data-action="followers" data-href="https://plus.google.com/<YOUR GOOGLE+ USER ID>" data-width="320" data-height="240" data-rel="author"></div>
</div>
@Scarygami
Scarygami / app.yaml
Created April 25, 2013 13:16
Handling multipart/related or multipart/mixed requests, comparable to mediaupload requests of some Google APIs (https://developers.google.com/glass/media-upload#multipart), using webapp2 and the email library on App Engine
application: upload-test
version: 1
runtime: python27
threadsafe: true
api_version: 1
handlers:
- url: .*
script: main.app

There are several triggers you can use for sending timeline updates:

  • Location updates
  • User actions (share/custom/reply)
  • Some "external" trigger coming from your service

But there is one use-case (that I think is rather useful) that isn't covered by those triggers: User triggers an action and you want to send them a series of timeline cards/updates on a certain schedule.

Anything timer related falls into this category ("This card will self-destroy in 10 seconds") and I can think of several examples where this can be useful.

@Scarygami
Scarygami / autoenhance.py
Last active December 4, 2020 10:14
Simple command-line tool to autoenhance photos via Google+.
#!/usr/bin/python
#
# Copyright 2013 Gerwin Sturm, FoldedSoft e.U.
# www.foldedsoft.at / google.com/+GerwinSturm
#
# 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
@Scarygami
Scarygami / autoawesome-tour.py
Last active December 28, 2015 04:09
Turn your Google+ albums into interactive tours. See [https://googledrive.com/host/0B1pwzJXH7GP8U0M1Ny1mRm5TT0E/] for a live result
#!/usr/bin/python
#
# Copyright 2013 Gerwin Sturm, FoldedSoft e.U.
# www.foldedsoft.at / google.com/+GerwinSturm
#
# 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
@Scarygami
Scarygami / cast_init.html
Created February 4, 2014 12:01
In an ideal world where everyone is running Chrome with the Chromecast extension installed things would be easy. But since this isn't the case here are some checks you might want to perform on your Chromecast-enabled website to make sure the behaviour isn't broken for other users.
<!DOCTYPE html>
<html>
<head>
<title>Chromecast init</title>
<script src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js"></script>
</head>
<body>
<div id="message"></div>
<script type="text/javascript">
@Scarygami
Scarygami / cast_loader.js
Last active August 29, 2015 13:56
Loads and prepares the Google Cast Chrome SDK. Just include the cast_loader.js then call cast_loader.onReady(function (result) { .... }), see included sample to see what the result codes mean.
/*
* Copyright (c) 2014 Gerwin Sturm, FoldedSoft e.U. / www.foldedsoft.at
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
@Scarygami
Scarygami / demo.html
Last active April 16, 2017 22:10
Polymer Google Sign-in
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>google-signin Demo</title>
<script src="platform/platform.js"></script>
<link rel="import" href="google-signin/google-signin.html">