This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILE="$1" | |
OUT=$(echo $FILE|sed -e 's/\./.9./') | |
$(identify -format "export WIDTH=%w" splash.png) | |
$(identify -format "export HEIGHT=%h" splash.png) | |
convert $FILE -bordercolor none -border 1 $OUT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(router). | |
-export([g/0]). | |
%% [{attribute,1,file, | |
%% {"/home/arjan/devel/zotonic/src/router.erl",1}}, | |
%% {attribute,1,module,router}, | |
%% {attribute,1,lager_records,[]}, | |
%% {attribute,3,export,[{route,1}]}, | |
%% {function,5,route,1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SERIAL TESTS | |
------------ | |
Old Zotonic PGSQL implementation w/ custom pgsql_pool | |
11:38:26.495 [info] squery test result: 42667 queries in 15000 ms (select now()) | |
11:38:41.495 [info] squery test result: 43696 queries in 15000 ms (select true) | |
11:38:56.495 [info] squery test result: 46251 queries in 15000 ms (select 'hello') | |
11:39:11.495 [info] squery test result: 28560 queries in 15000 ms (select count(*) from rsc) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gtk | |
import webkit | |
view = webkit.WebView() | |
sw = gtk.ScrolledWindow() | |
sw.add(view) | |
win = gtk.Window(gtk.WINDOW_TOPLEVEL) | |
win.add(sw) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule TestApp.TwitterController do | |
use Phoenix.Controller | |
# Routing configuration: | |
# | |
# scope "/twitter", TestApp do | |
# pipe_through :browser_session | |
# get "/:lang/authorize", TwitterController, :authorize | |
# get "/redirect", TwitterController, :authorize_return | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"cards": [ | |
{ | |
"author": 356, | |
"category": "card", | |
"hashtags": [ | |
{ | |
"category": "hashtag", | |
"id": 355, | |
"title": "#gianluca" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from smartcard.CardType import AnyCardType | |
from smartcard.CardRequest import CardRequest | |
from smartcard.util import toHexString | |
from smartcard.System import readers | |
print readers() | |
import webbrowser | |
cardtype = AnyCardType() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defimpl Poison.Encoder, for: Timex.DateTime do | |
use Timex | |
def encode(d, _options) do | |
fmt = DateFormat.format!(d, "{ISO}") | |
"\"#{fmt}\"" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule GenServer.Interface do | |
defmacro defcall(function, arity) do | |
args = for n <- :lists.seq(1,arity), do: {"arg" <> Integer.to_string(n) |> String.to_atom, [], Elixir} | |
quote do | |
def unquote(function)(server, unquote_splicing(args)) do | |
GenServer.call(server, {unquote(function), unquote_splicing(args)}) | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defimpl Poison.Encoder, for: Timex.DateTime do | |
use Timex | |
def encode(d, _options) do | |
fmt = DateFormat.format!(d, "{ISO}") | |
"\"#{fmt}\"" | |
end | |
end |