Skip to content

Instantly share code, notes, and snippets.

View fracek's full-sized avatar
🎯
Focusing

Francesco Ceccon fracek

🎯
Focusing
View GitHub Profile
define C-struct <AboutDialog>
constant slot AboutDialog-parent-instance :: <C-XXX-interface>;
constant slot AboutDialog-priv :: <C-XXX-interface>;
end C-struct
define C-function gtk-about-dialog-new
result res :: <C-XXX-interface>;
c-name: "gtk_about_dialog_new";
end;
define function http-delete
(url, #rest args)
=> (response :: <http-response>)
apply(http-request, url, #"delete", args);
end function http-delete;
define http-method get
parameter params
parameter follow-redirects :: false-or(<positive-integer>) = #t
parameter headers :: <header-table>
parameter read-response-body? = #f
end http-method get;
define http-method get
(#key headers :: <header-table>,
params,
@fracek
fracek / download.py
Created June 10, 2013 10:40
A simple script to create a .cbz comic from the DotA 2 online comic. It should be easy to adapt it to other web comics.
from bs4 import BeautifulSoup
from urllib2 import urlopen
import os
import shutil
import sys
NUM_PAGES = 48
URL = "http://www.dota2.com/comics/are_we_heroes_yet/{}/"
IMAGE_ID = "comicPageImg"
EXT = ".jpg"
@fracek
fracek / index.html
Created May 30, 2013 20:32
Play with World of Warcraft guild tabards. Dependencies: `jquery.js`, `core.js` and `guild-tabard.js`.
<html>
<head>
<title>Guild Tabard Creator</title>
<script src="jquery.js"></script>
<script src="core.js"></script>
<script src="guild-tabard.js"></script>
<script src="script.js"></script>
</head>
<body>
<canvas id="guild-tabard" width="240" height="240" style="display: block; margin: 50px auto;"></canvas>
module: client-test
synopsis:
author: Francesco Ceccon
define function request-with-params ()
let p = table(<string-table>, "param1" => "value1", "param2" => "value2");
/*
* Shortcut to add params to the request
*/
@fracek
fracek / client-test.dylan
Created May 5, 2013 18:57
Proposal for a http-post method in http-client
module: client-test
synopsis:
author: Francesco Ceccon
define function request-with-params ()
let p = table(<string-table>, "param1" => "value1", "param2" => "value2");
/*
* Shortcut to add params to the request
*/
module: client-test
synopsis:
author: Francesco Ceccon
define function request-with-params ()
let p = table(<string-table>, "param1" => "value1", "param2" => "value2");
/*
* Shortcut to add params to the request
*/
@fracek
fracek / doc2.rst
Last active December 14, 2015 18:59
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 5 and 2 different commits each, respectively.
#
nothing to commit (working directory clean)