Skip to content

Instantly share code, notes, and snippets.

View lnlsn's full-sized avatar
🏠
Working from home

LnLsn lnlsn

🏠
Working from home
  • Sao Paulo - Brazil
View GitHub Profile
@lnlsn
lnlsn / media-query-reporter.css
Created May 6, 2012 01:16
Media Query Reporter
body:after {
content: "less than 320px";
font-size: 300%;
font-weight: bold;
position: fixed;
bottom: 60px;
width: 100%;
text-align: center;
background-color: rgba(163, 43, 41, 0.7);
color: #fff;
@lnlsn
lnlsn / .profile
Last active August 29, 2015 14:08
guix root .profile
export PKG_CONFIG_PATH=$HOME/.guix-profile/lib/pkgconfig
export ACLOCAL_PATH=$HOME/.guix-profile/share/aclocal
export PATH=$HOME/.guix-profile/bin:$PATH
export GUILE_LOAD_COMPILED_PATH=$HOME/.guix-profile/share/guile/site/2.0
export GUILE_LOAD_PATH=$HOME/.guix-profile/share/guile/site/2.0
export CPAHT=$HOME/.guix-profile/include
export LIBRARY_PATH=$HOME/.guix-profile/lib
@lnlsn
lnlsn / sample.org
Last active September 16, 2015 00:50
Org-mode Sample
(org-babel-do-load-languages
 (quote org-babel-load-languages)
 (quote ((emacs-lisp . t)
	   (C . t)
	   (calc . t))))
@lnlsn
lnlsn / fact.scm
Last active September 16, 2015 00:44
Guile Factorial Sample
#!/usr/bin/guile \
-e main -s
!#
(define (fact n)
(if (zero? n) 1
(* n (fact (- n 1)))))
(define (main args)
(display (fact (string->number (cadr args))))
(newline))
package main
// from: http://programmingpraxis.com/2009/02/20/rot13/#comment-4347
import (
"fmt"
"strings"
"unicode"
)
@lnlsn
lnlsn / pwgen-xclip.sh
Last active September 16, 2015 00:41
Generate random password
~
$ pwgen -ny 25 -N 1 | xclip
~
$ xclip -o
aing2daeQu1ieb`ai3aiqu5yu
~
$
@lnlsn
lnlsn / go.sh
Last active December 21, 2015 23:58
#!/bin/bash
goget="go get -u -v"
$goget golang.org/x/tools/cmd/...
$goget github.com/alecthomas/gometalinter
gometalinter --install --update
$goget github.com/nsf/gocode
$goget github.com/s-urbaniak/agoc
$goget github.com/s-urbaniak/acme/cmd/apl

Freebsd for Eee-PC Asus 1201T

This doc describes how to configure FreeBSD 10.2 at Eee-PC.

Installation

Boot Manager

$ su
@lnlsn
lnlsn / acme.c
Created December 21, 2015 15:18
void
iconinit(void)
{
Rectangle r;
Image *tmp;
if(tagcols[BACK] == nil) {
tagcols[BACK] = allocimage(display, Rect(0,0,1,1), RGBA32, 1, 0xBDC3C7FF);
tagcols[HIGH] = allocimage(display, Rect(0,0,1,1), RGBA32, 1, 0x3498DBFF);
tagcols[BORD] = allocimage(display, Rect(0,0,1,1), RGBA32, 1, 0x7F8C8DFF);
/usr/bin/xrdb -merge ~/.Xresources
xset +fp /usr/share/fonts/local
xset fp rehash
# Start dropbox
[[ -f $HOME/.dropbox-dist/dropboxd ]] && $HOME/.dropbox-dist/dropboxd /newerversion &
setxkbmap -layout "us" -variant "dvp"
xsetroot -cursor_name left_ptr