Skip to content

Instantly share code, notes, and snippets.

View Scarygami's full-sized avatar

Gerwin Sturm Scarygami

View GitHub Profile
@Scarygami
Scarygami / necessary_client.html
Last active July 14, 2018 08:36
Google Sign-In 2.0 Server-side samples
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Google Sign-in 2.0 - Necessary Client</title>
<script src="https://apis.google.com/js/client:platform.js?onload=clientLoaded" async defer></script>
</head>
<body>
<button id="enable_offline_access">Enable Offline Access</button>
@Scarygami
Scarygami / rick-roll.html
Created April 10, 2015 19:52
Auto-Rickroller
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/google-signin/google-signin.html">
<link rel="import" href="../bower_components/paper-shadow/paper-shadow.html">
<link rel="import" href="../bower_components/paper-input/paper-autogrow-textarea.html">
<link rel="import" href="../bower_components/paper-input/paper-input-decorator.html">
<link rel="import" href="../bower_components/paper-button/paper-button.html">
<link rel="import" href="../bower_components/google-apis/google-client-api.html">
<polymer-element name="rick-roll">
<template>
@Scarygami
Scarygami / QuickStats.gs
Created April 8, 2015 17:36
G+ Quick Stats
/**
* Creates a menu entry in the Google Sheets UI when the document is opened.
*/
function onOpen(e) {
SpreadsheetApp.getUi().createAddonMenu()
.addItem('Start', 'showSidebar')
.addToUi();
}
/**
<polymer-element name="demo-element">
<template>
<paper-toggle-button checked="{{a}}"></paper-toggle-button>
<paper-toggle-button checked="{{b}}"></paper-toggle-button>
</template>
<script>
Polymer({
a: false,
b: false,
aChanged: function () {
@Scarygami
Scarygami / location_history_minify.py
Created November 10, 2014 11:18
location_history_minify
#!/usr/bin/env python
# Copyright 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
#
@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">
@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 / 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 / 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 / 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