Skip to content

Instantly share code, notes, and snippets.

Colin Frei colinfrei

  • Liip
  • Switzerland
Block or report user

Report or block colinfrei

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
colinfrei / aha-app-allergy-data.json
Created May 24, 2019
Swiss Allergy / Pollen information from / Pollen-News app
View aha-app-allergy-data.json
This is the slightly annotated data that the Pollen-News app uses to provide
allergy & pollen information for Switzerland.
Data fetched from
poac: Gräser
plat: Platane
fagu: Buche
View letters.html
<body style="background-color:black; font-size: 72px; color: white; padding: 50px 100px; font-family:Arial; text-transform: uppercase;">
<div style="padding: 50px;" contenteditable="true" autocorrect="off" spellcheck="false">HALLO</div>
colinfrei /
Last active Sep 24, 2018 — forked from jamesstout/
always use the local timezone
# -*- coding: utf-8 -*-
import alfred
import calendar
import time
import math
from delorean import now, parse, epoch
# global var to see if user
# has a time offset
colinfrei / gist:8b775ccd09cc51c19b79
Last active Mar 23, 2017
Sending an SMS with Llama using an Android Intent
View gist:8b775ccd09cc51c19b79
View index.html
<!DOCTYPE html>
<div id="stuff"></div>
<button id="button">fdoo</button>
<script type="text/javascript">
var xmlhttp;
View bugzilla-count.php
use Symfony\Component\Finder\Finder;
* - Install the dependencies using composer install (see if you don't have composer)
* - Download the bugzilla email addresses as a csv file and save it in the same folder as this file
* - Adjust the values of the three variables below
* - Run the script from the command line like this: php bugzilla-count.php
colinfrei / deploy.rb
Created Nov 8, 2012
Capistrano recipe to add an htaccess file when deploying
View deploy.rb
# [...]
set :htaccess_username, "User"
set :htaccess_password, "Password"
#set :htaccess_password_hashed, "zJDC6IeGdG8QU"
before "deploy:create_symlink", "deploy:htaccess_protect"
# [...]
colinfrei / ServiceAliasPass.php
Created Nov 7, 2012
Generic class to allow overwriting a service
View ServiceAliasPass.php
namespace Symfony\Component\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Alias;
* Overwrites a service with an alias to a new service, and injects the old service as a parent of the new one
View gist:1869399
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><description>Here is my very fabulous posts</description><pubDate>Sun, 19 Feb 2012 17:38:08 +0100</pubDate><lastBuildDate>Sun, 19 Feb 2012 17:38:08 +0100</lastBuildDate><link></link><title>My fabulous posts</title><language>de</language><item><title>New News Article</title><description>New News Article Content</description><guid>2</guid><link>http://sandoz.lo</link><pubDate>Sun, 19 Feb 2012 17:38:08 +0100</pubDate><category></category></item><item><title>dingaling</title><description>dingdong</description><guid>5</guid><link>http://sandoz.lo</link><pubDate>Sun, 19 Feb 2012 17:38:08 +0100</pubDate><category></category></item></channel></rss>
colinfrei / gist:1710699
Created Jan 31, 2012
Mock object to simulate Phonegap iOS keychain plugin using cookies
View gist:1710699
function fakeKeychain() {
if (BROWSER === "Desktop") {
function createCookie(name, value, days) {
var expires;
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toGMTString();
else {
You can’t perform that action at this time.