View RevDate.js
"use strict";
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var RevDate = function RevDate(dateparse) {
_classCallCheck(this, RevDate);
var moment = new Date();
if (typeof dateparse !== 'undefined') {
moment = new Date(dateparse);
View fizz_buzz.exs
fizz_word = fn
(0, 0, _) -> "FizzBuzz"
(0, _, _) -> "Fizz"
(_, 0, _) -> "Buzz"
(_, _, third) -> third
end
fizz_buzz = fn n -> fizz_word.(rem(n, 3), rem(n, 5), n) end
View flac2mp3.fish
#!/usr/bin/fish
for file in *.flac
ffmpeg -i $file -ab 320k -map_metadata 0 -id3v2_version 3 (basename $file .flac).mp3
end
View config
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod1
set $ws1 "⠂work"
set $ws2 "⠃mail/IM"
set $ws3 "⠇misc"
View config.fish
# Path to your oh-my-fish.
set fish_path $HOME/.oh-my-fish
# Theme
#set fish_theme robbyrussell
set fish_theme bobthefish
#set fish_theme coffeeandcode
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-fish/plugins/*)
# Custom plugins may be added to ~/.oh-my-fish/custom/plugins/
View using-rxjs-instead-of-flux-with-react.md

Reposted from Qiita

For almost a year now, I've been using this "flux" architecture to organize my React applications and to work on other people's projects, and its popularity has grown quite a lot, to the point where it shows up on job listings for React and a lot of people get confused about what it is.

Why I'm tired of using and teaching flux

There are a billion explainations on the internet, so I'll skip explaining the parts. Instead, let's cut to the chase -- the main parts I hate about flux are the Dispatcher and the Store's own updating mechanism.

If you use a setup similar to the examples in facebook/flux, and you use flux.Dispatcher, you probably have this kind of flow:

View osx_automount_nfs.md

I have spent quite a bit of time figuring out automounts of NFS shares in OS X...

Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:

/etc/auto_master (see last line):

#
# Automounter master map
#
+auto_master		# Use directory service
View keybase.md

Keybase proof

I hereby claim:

  • I am sardaukar on github.
  • I am sardaukar (https://keybase.io/sardaukar) on keybase.
  • I have a public key whose fingerprint is 7AB6 C47E 0B86 7ECA 0229 F856 A8C4 1D3D A028 94E4

To claim this, I am signing this object:

View gist:1db118dbad76edfff040
# Menu bar
class MyWindow < Praises::Window
menu do
item :help, 'Help' do
item :about 'About'
end
item :file 'File' do
View gist:e7c8d2bc453d58b9ed5a
#
# Using Praises to show 2 windows, and output text to one of them,
# and halt with a “press any key to continue” prompt
#
w1 = Praises::Window.new(width: '100%', height: '50%', show: true)
w2 = Praises::Window.new(width: '100%', height: '50%', bottom: 0, show: true)
w1.puts "This is the top window"
Praises.blocking_getch