Skip to content

Instantly share code, notes, and snippets.

View geschke's full-sized avatar

Ralf Geschke geschke

View GitHub Profile
geschke / OwnServerlessPolicy
Created July 14, 2019 15:24
AWS IAM policy additional to AWSLambdaFullAccess and AmazonAPIGatewayAdministrator policies.
View OwnServerlessPolicy
"Statement": [
"Action": [
geschke / redis-server.service
Last active January 10, 2021 20:11
WARNING. OUTDATED! The information on this page is severely out of date. Don't use it! Ubuntu systemd service file for Redis. The server was updated to a Ubuntu 15.04 (Vivid Vervet) distribution. Redis was installed from the PPA from Roman Wookey ( After the switch to systemd instead of Upstart,…
View redis-server.service
Description=Redis Datastore Server
ExecStartPre=/bin/mkdir -p /var/run/redis
ExecStartPre=/bin/chown redis:redis /var/run/redis
geschke / gdrive-example.php
Created April 21, 2014 17:15
Google Drive PHP API library example to download a spreadsheet file
View gdrive-example.php
require_once __DIR__ . '/vendor/autoload.php';
class DriveFile
private $service = null;
private $client = null;
private $auth;
geschke / composer.json
Last active August 29, 2015 14:00
Google Drive PHP Client example - composer.json
View composer.json
"require" : {
"google/apiclient": "dev-master"
geschke / pre-commit.php
Last active December 17, 2015 15:18
git post-commit hook to simulate revision numbers in current branch and replace $Revision$ with current number in all *.sql files. Please rename to "pre-commit" and place it into .git/hooks/ directory.
View pre-commit.php
$output = array();
$rootDirCurrent = getcwd();
exec('git rev-parse --show-toplevel',$rootDir);
$rootDir = implode($rootDir);
geschke / gist:396572
Created May 10, 2010 21:25
JavaScript example code for Facebook login with Django Middleware
View gist:396572
<!-- slightly modified example of Facebook Connect with JavaScript SDK
Requirements: jQuery, Django Facebook Middleware (see
$(document).ready(function() {
// Logout link binding
$('#fb-logout').bind('click', function() {
FB.logout(function() {});
setTimeout(function() {
geschke /
Created May 10, 2010 21:15
Django Middleware for Facebook integration. Slightly modified to work with newer versions of Python Facebook SDK from
# Facebook Connect Middleware with new Facebook Python SDK from and Graph API
# based on
from django.contrib.auth import authenticate, login, logout, get_user
from django.contrib.auth.models import User
from django.conf import settings
from kuerbisorg.comcore.models import ComUser, COUNTRY_CHOICES, ACTIVE_CHOICES