Skip to content

Instantly share code, notes, and snippets.

@anekos
anekos / myGaps.hs
Created August 18, 2018 01:38
avoidStruts が上手くいかないので、強引にステータスバーの領域をあける
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, DeriveDataTypeable, TypeSynonymInstances, PatternGuards #-}
module Anekos.Lib.MyGaps (
MyGaps(..),
myGaps
) where
import XMonad
import Graphics.X11 (Rectangle(..))
@anekos
anekos / find-input-device
Created March 8, 2018 11:58
Tap (メリケンサック)キーボード用スクリプト
#!/bin/bash
set -euC
# exec 5> /tmp/xmosh/shell-script-debug.out
# BASH_XTRACEFD="5"
# PS4='$LINENO: '
# set -x
if [ "$#" -lt 1 ]
@anekos
anekos / dzen-status
Last active January 21, 2018 07:20
dzen2 で常時表示のステータスバー的なのを作って、コマンドで更新できるようにする
#!/bin/bash
# set -x
DZEN_OPTIONS=(-dock -x 1920 -y 0 -w 1920 -ta c -h 20 -fg 'white' -fn 'VL Gothic')
cmd="$1"
@anekos
anekos / app.js
Created January 11, 2018 08:23
Elgato Stream Deck の自分アプリ
// http://www.iconshock.com/flat-icons/general-icons/audio-volume-none-icon
// https://www.svgrepo.com/svg/47144/air-conditioner
// https://www.flaticon.com/packs/characters-and-numbers
// https://github.com/Lange/node-elgato-stream-deck
// https://github.com/joshmarinacci/node-pureimage
const FS = require('fs');
const HTTP = require('http');
const PImage = require('pureimage');
const Path = require('path');
function s:invert(...)
let &background = &background ==# 'light' ? 'dark' : 'light'
endfunction
call timer_start(10, function('s:invert'), {'repeat': -1})
@anekos
anekos / varrrrr.js
Last active February 2, 2017 12:16
varrrrrrrrrrrr
function f() {
return v;
var v;
}
function g() {
if (false) { var v }
return v;
}
#!/usr/bin/ruby
# vim: set fileencoding=utf-8 :
def foo﹣bar
puts('I am lisp')
end
foo﹣bar
@anekos
anekos / base-main.clj
Created March 15, 2016 12:08
sonic-template for clojure
(ns {{_expr_:join(split(substitute(expand('%:r'), '_', '-', 'g'), '/')[1 :], '.')}}
(:require [clojure.string :as string]))
@anekos
anekos / longcat.vim
Last active February 15, 2016 12:31
Long cat is long.
function! s:long_cat (n)
let l:top = copy([
\ ' /\___/\',
\ ' / \',
\ ' | o o |',
\ ' \ # |',
\ ' \ _|_ /',
\ ' / \______',
\ ' / _______ ___ \',
\ ' |_____ \ \__/',
@anekos
anekos / .vimperatorrc
Created January 27, 2016 13:21
.vimperatorrc 44
js << EOM
liberator.modules.CompletionContext = liberator.eval('CompletionContext', modules);
Command = liberator.eval('Command', modules);
EOM