Skip to content

Instantly share code, notes, and snippets.

@bake
bake / lemonbar.fish
Last active November 19, 2015 01:09
i3 workspace indicators in lemonbar
#!/usr/bin/fish
set normal '%{F#ffffff}'
set urgent '%{F#e8586e}'
set good '%{F#00ff00}'
set inactive '%{F#616161}'
set separator $inactive' / '$normal
function workspace
set -l length (i3-msg -t get_workspaces | jq -r '. | length')

Keybase proof

I hereby claim:

  • I am bakerolls on github.
  • I am bake (https://keybase.io/bake) on keybase.
  • I have a public key whose fingerprint is E7A1 0752 4BD5 957A A6BA DC9F E801 1559 C2C2 761E

To claim this, I am signing this object:

@bake
bake / rbapi.js
Last active February 12, 2016 20:34
Rocket-Beans-TV-API-WSSE-Authentication https://github.com/BakeRolls/rbapi.js
var http = require('http');
var moment = require('moment');
var sha1h = require('sha1-hex');
var rand = function(num) {
return Math.random().toString(36).slice(num);
};
var base64encode = function(str) {
return new Buffer(str).toString('base64')
@bake
bake / 1337walls.fish
Created February 8, 2015 01:47
1337walls@osx
function 1337wall
set -l path "$HOME/.1337walls/"
set -l image (curl -s 'http://1337walls.w8l.org/api/?rows=1080p&count=1&format=raw&client=de.bakerolls.osxcli')
wget -q $image -P $path
set -l image (basename $image)
osascript -e "tell application \"Finder\" to set desktop picture to POSIX file \"$path$image\""
end
@bake
bake / lyricwiki.coffee
Created February 6, 2015 23:10
Wikia Lyrics
http = require 'http'
itunes = require 'playback'
entities = require 'entities'
size = process.stdout.getWindowSize()
api = 'http://lyrics.wikia.com/api.php'
itunes.on 'playing', (track) ->
search track.artist, track.name
@bake
bake / Config.php
Last active December 20, 2015 23:48
<?php
class Config {
public static $paths = [
'base' => '/index.php',
'views' => 'views/',
'foo' => 'bar'
];
public static function path($path) {
return static::$paths[$path];
}