Skip to content

Instantly share code, notes, and snippets.

@rmhsilva
rmhsilva / clss-let.lisp
Last active December 18, 2017 22:35
CLSS-LET
;; Yay freedom of expression
(defmacro clss-let (doc bindings &body body)
"Evaluate BODY after selecting tags specified in BINDINGS from DOC
BINDINGS should be a list of LET bindings, execept the second element refers
to a tag in DOC to be bound to the variable.
e.g (clss-let (plump:parse doc-html)
((paragraph \"p.foo\")
@rmhsilva
rmhsilva / simple-nginx-webdav.sh
Created October 18, 2017 11:43 — forked from dysinger/simple-nginx-webdav.sh
A simple nginx/webdav setup for use with things like mobile-org
#!/bin/sh
# on ubuntu: need some utils & dev libs
sudo apt-get install apache2-utils openssl libssl-dev libpcre3-dev
# compile nginx
cd /tmp
curl http://nginx.org/download/nginx-0.7.64.tar.gz | tar xz
cd nginx*
./configure --with-http_ssl_module --with-http_dav_module \
# Check domain availability
import time # https://docs.python.org/2/library/time.html#time.sleep
import unirest # http://unirest.io/python
import json # https://docs.python.org/2/library/json.html
AUTH_TOKEN = 'xxxxxxxxxx'
RATE_LIMIT = 11 # Seconds, based on a limit of 6 per minute, plus margin
WORDS = ['abc', 'bdlahecnuhfsjf']
;;;; Dreaming of writing Vue frontends in a lispy way.
(defmacro defcomponent (name (&rest imports) &key template data style))
;; Goal:
;; Replicate http://vue-loader.vuejs.org/en/start/spec.html in CL
(defcomponent hello ()
:template (with-html
;;;; schema.lisp -- dreams of an ideal database schema record
;;;
;;; Ideally: this file contains the database schema, represented as a sequence
;;; of migrations. The goal is to have one single database schema, stored in a
;;; DSL. This makes it possible to have easy migations as well as easy database
;;; modelling in code.
;; What kind of migrations can there be?
;; - table changes
;; - views
@rmhsilva
rmhsilva / my.css
Created December 6, 2015 23:24 — forked from anonymous/my.css
CSS Gradient Animation
background: linear-gradient(138deg, #2dc39d, #4082c9);
background-size: 400% 400%;
-webkit-animation: MoveBG 6s ease infinite;
-moz-animation: MoveBG 6s ease infinite;
-o-animation: MoveBG 6s ease infinite;
animation: MoveBG 6s ease infinite;
@-webkit-keyframes MoveBG {
    0%{background-position:50% 0%}
    50%{background-position:50% 100%}
    100%{background-position:50% 0%}
@rmhsilva
rmhsilva / keybase.md
Created September 22, 2014 17:01
Keybase.io proof

Keybase proof

I hereby claim:

  • I am rmhsilva on github.
  • I am rmhsilva (https://keybase.io/rmhsilva) on keybase.
  • I have a public key whose fingerprint is 342E F0FB 24B3 B54B 5791 9E56 FBAE B9DE 3942 60A0

To claim this, I am signing this object: