Skip to content

Instantly share code, notes, and snippets.

View ralt's full-sized avatar

Florian Margaine ralt

View GitHub Profile
\documentclass{report}
\usepackage{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{LEFT}
\chead{CENTER}
\rhead{RIGHT}
\lfoot{a very long left header}
\cfoot{}
\rfoot{a very long right header}
// example of how you do stuff as user x
route('/dashboard', function() { loadDashboard(getSession('user_id')); });
// example of link to become another user
// make sure it's admin only
route('/changelink/:userid', requireAdmin, function(req) {
setSession('is_faking', getSession('user_id'));
setSession('user_id', req.params.userid);
});
@ralt
ralt / gist:f4bd9e9133dee42e36a6
Last active April 16, 2018 19:30
The Contributors Army

tl;dr we're lazy, we're coders.

Let's make use of that.

  • We don't like to start off new projects and write all the booooring boilerplate
  • We like to fiddle with code and fix it
  • We like recognition
  • We're quickly bored

Hence, I present to you my idea:

@ralt
ralt / background.js
Created December 15, 2014 08:57
Progress... on a chrome NativeMessaging receiving app
chrome.browserAction.onClicked.addListener(connect);

Keybase proof

I hereby claim:

  • I am ralt on github.
  • I am fmargaine (https://keybase.io/fmargaine) on keybase.
  • I have a public key whose fingerprint is 59C0 D5DA 7AEB 336D 1424 BF56 843F 6D75 3D94 972A

To claim this, I am signing this object:

So... my use case is the following: I have 2 screens. And I have ~3-5
windows on each screen. So I want an easy way to go to each window
quickly.
I currently have this in my .stumpwmrc to help with this:
(loop for i from 1 to 9
do (define-key
*top-map*
(kbd (format nil "s-~d" i))
I am the Miaou user with id 3 and name "Florian" on http://dystroy.org/miaou
@ralt
ralt / gist:cd241e91428ffbc43f89
Created January 30, 2015 16:18
Makefile 1-1 different folders
SCSS_SOURCES := $(wildcard scss/*.scss)
CSS_OUT := $(patsubst %.scss, tmp/%.css, $(notdir $(SCSS_SOURCES)))
all: gen-css
tmp/%.css: scss/%.scss
cp $< $@
gen-css: $(CSS_OUT)
(defcommand head-windowlist () ()
"shows the list of windows on a single head"
(select-window-from-menu
(head-windows (current-group) (current-head))
*window-format*))