Skip to content

Instantly share code, notes, and snippets.

(ns liberagent.routing
(:require
[domkm.silk :as silk])) ;; Go to definition on domkm.silk works, but silk in the :as part is mark as unused
(def api-routes
(silk/routes {:api-data [["api"] {"limit" (silk/? (silk/int :limit) {:limit 100}) ;; silk/routes is being hinted as a possibility to :require, when refactored it adds another [domkm.silk :as silk]
"offset" (silk/? (silk/int :offset) {:offset 0})} (serve/POST)]})) ;; silk/? and silk/int are marked as unresolved
@tillda
tillda / gist:6e3f70d357765d9b6629
Created August 19, 2014 16:33
Glogster - dalsi upravy textu
var containerHeight = this.viewport.height; // vypocitana pixelova velikost na glogu
var currentFlowHeight = $(this.domHtml).height(); // velikost vyrenderovaneho textu
var mainFontSize = $(this.domMarkup).data("mainfontsize"); // z normalizeru
var scrollingForbidden = false;
var domLastInnerSizedElement = this.domText; // posledni element nad this.domHtml s nastavenyma velikostma n,
var currentBoxWidth = $(domLastInnerSizedElement).width();
var currentBoxHeight = $(domLastInnerSizedElement).height();
function decreaseFontSize(match, value, unit) {
var textNormalizer = (function() {
function hasFontSize(dom) {
if (!dom) {
return false;
}
if (!dom.style) {
return false;
}
var fs = dom.style.fontSize;
@tillda
tillda / used-fonts.json
Last active August 29, 2015 14:04
Glogster fonts definition
{
fonts: {
list: [
{
family: "Supercool",
weight: "normal",
style: "normal",
files: {
ttf: "http://we.com/fonts/supercool.ttf",
woff: "http://we.com/fonts/supercool.woff"