Skip to content

Instantly share code, notes, and snippets.

View vbuaraujo's full-sized avatar

Vítor De Araújo vbuaraujo

View GitHub Profile
@-moz-document url-prefix(http://), url-prefix(https://) {
* {
color: white !important;
background: black !important;
font-family: Fixed !important;
}
body {
font-size: 18px !important;
}
// ==UserScript==
// @name unfix-all-the-toolbars
// @namespace http://inf.ufrgs.br/~vbuaraujo/
// @include *
// @version 1
// @grant none
// ==/UserScript==
// Based on https://stackoverflow.com/questions/13696100/greasemonkey-script-to-make-fixed-positioned-elements-static
@vbuaraujo
vbuaraujo / white-on-black.css
Created September 11, 2015 16:17
User style for fixed font, white text and black background.
@-moz-document url-prefix(http://), url-prefix(https://),
url-prefix(about:sessionrestore), url-prefix(about:newtab) {
* {
color: white !important;
background: black !important;
font-family: Fixed, monospace !important;
}
body {
font-size: 18px !important;
@vbuaraujo
vbuaraujo / Makefile
Last active June 5, 2016 17:05
stitchcounter (from @manuel_uberti)
# -J generates the module's import file, which is necessary for CHICKEN
# to know which bindings are available in the module. I compiled each file
# separately, but you could have just run 'csc -J *.scm' instead (as long
# as the files were provided in order, I guess, since to compile
# stitchcounter.scm you need the imports file from io-utils).
just_do_it:
csc -c -J io-utils.scm
csc -c -J stitchcounter.scm
csc io-utils.o stitchcounter.o
/* AGENT_SHEET */
@-moz-document url-prefix(http://), url-prefix(https://), url-prefix(file://),
url-prefix(about:sessionrestore), url-prefix(about:newtab)
{
* {
color: white !important;
background: black !important;
font-family: Fixed !important;
font-size: 18px !important; /* force everything to use the same size */
letter-spacing: 0px !important;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
;;;; Restore the *Completions* window behavior of Emacs 24.
;; Based on https://emacs.stackexchange.com/a/21537
;; UPDATE: Turns out my previous solution could be radically simplified;
;; I was just using the wrong order for the 'display-buffer-*' functions.
(add-to-list 'display-buffer-alist
'("\\*Completions\\*"
(display-buffer-pop-up-window
display-buffer-use-some-window)
class Promise(object):
def __init__(self, worker=None):
# A promise may be 'pending' or fulfilled. If it's fulfilled, then it
# may be 'resolved' or 'rejected'.
self.status = 'pending'
# After it's fulfilled, it has a value.
self.value = None
# Before it's fulfilled, computations waiting on the value of the
# promise are queued for execution when it gets fulfilled (either
# resolved or rejected).
(use-modules (srfi srfi-1))
(define valid-tlds '(".com" ".org" ".net")) ;; ...
(define (valid-email? email)
(any (lambda (tld) (string-suffix? tld email)) valid-tlds))
(define-syntax >>
(syntax-rules ()
[(>> val1 (fun args ...))
(fun val1 args ...)]
[(>> val1 val2 rest ...)
(>> (>> val1 val2) rest ...)]))
;; Examples.
(format #t "~s\n"