Skip to content

Instantly share code, notes, and snippets.

@arjan
arjan / gist:2633806
Created May 8, 2012 09:16
Zotonic mail with too long lines
Delivered-To: [email protected]
Received: by 10.204.184.4 with SMTP id ci4csp335999bkb;
Tue, 8 May 2012 02:10:41 -0700 (PDT)
Received: by 10.213.35.194 with SMTP id q2mr1827376ebd.78.1336468241532;
Tue, 08 May 2012 02:10:41 -0700 (PDT)
Return-Path: <[email protected]>
Received: from goudentonamsterdam.nl (miffy.whatwebwhat.com. [80.69.73.11])
by mx.google.com with ESMTPS id e47si5957608eea.79.2012.05.08.02.10.41
(version=TLSv1/SSLv3 cipher=OTHER);
Tue, 08 May 2012 02:10:41 -0700 (PDT)
@arjan
arjan / gist:2359320
Created April 11, 2012 13:34
Zotonic releaes notes 0.8.0
Welcome Zotonic 0.8.0, released on April 11, 2012
These are the changes for Zotonic release 0.8.0. The most important
changes are summarized first, below that is a full "git shortlog" of all
changes since release 0.7.
New Modules
-----------
mod_oembed - Provides an easier way to embed external content into
@arjan
arjan / gist:1827297
Created February 14, 2012 14:52
Component [FinancialTransaction] De boeking is niet in evenwicht op: 2012 / 2 (Type: Overige) - Verschil: EUR -17,56
<?xml version="1.0" encoding="UTF-8"?>
<eExact xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="eExact-XML.xsd">
<GLTransactions>
<GLTransaction entry="666">
<Journal code="81" />
<Description>
<![CDATA[Realisation of Market buy-order 34 by amount: €110.00 (± 137.638 gr.) [realising]]]>
</Description>
<GLTransactionLine>
<Date>2012-02-14</Date>
@arjan
arjan / AndroidManifest.xml
Created February 13, 2012 21:02
Android manifest for Sharing button
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="nl.miraclethings.arris"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="9" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:label="@string/app_name" android:name="MainActivity">
+ case DbDatabase of
+ undefined ->
+ % Use zotonic config and per host+node schema
+ DbDatabase1 = z_config:get(dbdatabase, "zotonic"),
+ DbSchema = atom_to_list(Host) ++ "+" ++ hd(string:tokens(atom_to_list(node()), "@"));
+ _ ->
+ DbDatabase1 = DbDatabase,
+ DbSchema = proplists:get_value(dbschema, SiteProps, z_config:get(dbschema))
+ end,
=ERROR REPORT==== 27-Dec-2011::15:37:27 ===
** Generic server <0.119.0> terminating
** Last message in was summary
** When Server state == {state,true,
{state,0.95,0.04,847,
[{3,5},
{4,11},
{5,26},
{6,45},
{7,72},
@arjan
arjan / import-new-release.sh
Created June 8, 2011 19:54
Quickly import a python package with git-buildpackage
#!/bin/sh
set -e
SRCPKG=`python -B setup.py --name`
PKG=`basename $PWD`
DISTDIR="../../$PKG/dist"
RELEASE=`ls $DISTDIR -t|head -n 1|sed 's/\.tar\.gz//'|sed s/${SRCPKG}-//`
if [ "`git tag|grep upstream/$RELEASE`" != "" ]; then
@arjan
arjan / mod_google_blog_pinger.erl
Created March 5, 2011 13:44
Zotonic module to ping the Google blog pinger service whenever an article is updated.
%% @author Arjan Scherpenisse <[email protected]>
%% @copyright 2011 Arjan Scherpenisse
%% Date: 2011-03-05
%% @doc Ping Google blog pinger service whenever an article is updated.
%% Copyright 2011 Arjan Scherpenisse
%%
%% 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
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName identity.local
DocumentRoot /home/arjan/mm/identity/trunk/www
php_value memory_limit 64M
ErrorLog /var/log/apache2/identity-error.log
CustomLog /var/log/apache2/identity-access.log combined
@arjan
arjan / make-separate-zotonic-module.sh
Created February 15, 2011 19:21
convert zotonic repo to separate hg module
#!/bin/bash
GOOGLE_USERNAME="username"
GOOGLE_PASSWORD="xxx"
# note git-z is zotonic checkout in git
if [ "$1" = "" ]; then
echo "$0 <module>"
exit 1