Skip to content

Instantly share code, notes, and snippets.

View turbo's full-sized avatar

Pierre turbo

View GitHub Profile
@turbo
turbo / app.fnl.clj
Last active June 22, 2021 09:00
Write a Fennel Web App using Lapis and Turbo
; THIS IS A Fennel SOURCE FILE (.fnl) !NOT! clojure!
; you need to use luajit to run this, after using fennel --compile
; install lapis and turbo from luarocks
(local turbo (require "turbo"))
(local render_html (. (assert (require "lapis.html")) :render_html))
(fn render [parent expr]
(parent:add_header "Content-Type" "text/html")
(let [app (turbo.web.Application:new [
; No arguments, will work for 'localhost:8888' and 'localhost:8888/'
["/$" IndexHandler]
; Use the part of the url after /user/ as the first argument to
; UserHandler:get
["/user/(.*)$" UserHandler]
; Find two int's separated by a '/' after /add in the url
; and pass them as arguments to AddHandler:get
@turbo
turbo / test_file_loader.lua
Created October 14, 2019 15:17
busted no moon
local s = require 'say'
return function(busted, loaders)
local path = require 'pl.path'
local dir = require 'pl.dir'
local tablex = require 'pl.tablex'
local fileLoaders = {}
for _, v in pairs(loaders) do
if v ~= "moonscript" then
Google Bombs Removed All - Short News: There Is Shit Wrong with Your Article
====================
UX blogs for business: Part 1
====================
Next wave of encryption protection coming either as daylight savings tracker or a tool for sharing rich data
====================
Apple Makes MacBooks Gone Bad — With Free iOS Devices
====================
Lakewood Under Launch Requires Exposure of Detailed Development
====================
[$github, $bitbucket]
| (flatten) as $all_projects
| ([$all_projects[] | select(.stats.languages != null).stats.languages | to_entries] | flatten) as $langstats
| (
[
$all_projects[]
| select(.stats.languages != null).stats.languages
| keys
]
| flatten
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@turbo
turbo / bloomber.md
Created May 30, 2019 09:18
What's the Bloomberg Font

Bloomberg's current site and overall aesthetic is mainly an expression of Swiss/International style. A central part of that is it's grotesk, bold and slightly condensed typeface. The font used is Bw Haas Grotesk, available from Adobe Fonts as Neue Haas Grotesk (Display). It's lesser known sister-font is Bw Modelica (Condensed) (available through e.g. Elements).

version: "3.6"
x-influxlog: &influxlog
logging:
driver: syslog
options:
syslog-address: "udp://localhost:514"
tag: "{{.Name}}"
volumes:
#!/bin/bash
trap onexit 1 2 3 15 ERR EXIT
#--- onexit() -----------------------------------------------------
# @param $1 integer (optional) Exit status. If not set, use `$?'
onexit() {
# any items needed for cleanup here.
local exit_status=${1:-$?}
if [ ${exit_status} == 0 ]
##################
# Services #
##################
services:
# Service: Telegraf
# Purpose: Data collection agent
# Documentation: https://docs.influxdata.com/telegraf
telegraf:
image: telegraf