Skip to content

Instantly share code, notes, and snippets.

set $mode_location (h) home, (w) work
set $location home
mode "$mode_location" {
bindsym h exec set $location home
bindsym w exec set $location work
# back to normal: Enter or Escape
bindsym Escape mode "default"
#bindsym $mod+Shift+s mode "default"
}
@juanolon
juanolon / asteroids.js
Last active July 30, 2021 02:21
asteroids on web
// http://www.websiteasteroids.com/
(function() {
function Asteroids() {
if (!window.ASTEROIDS)
window.ASTEROIDS = {
enemiesKilled: 0
};
function Vector(x, y) {
if (typeof x == 'Object') {
@juanolon
juanolon / actionlist.vim
Created January 10, 2016 18:22 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
package main
import (
"fmt"
"log"
"net"
"net/rpc"
"reflect"
"github.com/davecgh/go-spew/spew"
@juanolon
juanolon / gist:3749191
Created September 19, 2012 11:34
override
[product_form_select_result]
Source=content/datatype/result/info/ezoption.tpl
MatchFile=content/datatype/result/info/product_form_option.tpl
Subdir=templates
@juanolon
juanolon / bashrc
Created November 1, 2010 14:20
show git branch and status in prompt
#git colors
txtgrn='\033[0;32m' # Green
txtred='\033[0;31m' # Red
txtcyn='\033[0;36m' # Cyan
txtblu='\033[0;34m' # Blue
bold=$(tput bold)
normal=$(tput sgr0)
check_git() {
local base_dir sub_dir branch