Skip to content

Instantly share code, notes, and snippets.

@MatejLach
MatejLach / rust_expression.rs
Created July 18, 2014 13:34
Showcasing how expressions can be used in Rust
fn main() {
let x = 10i;
let y = if x < 5 {"x is less than 5"} else if x == 5 {"x is equal to 5"} else if x > 5 {"x is more than five!"} else {"x is unknown!"};
println!{"{}", y};
}
@MatejLach
MatejLach / init.el
Created May 28, 2014 19:14
Basic emacs setup for almost every programming language in mainstream use
;; Matej Lach's Emacs config...
;; DO NOT BYTE-COMPILE THIS FILE!
;; This config is released under the terms of 'MIT' license, but Emacs itself is licensed under the GPLv3.
;; For package-specific licenses, see the details for each individual project...
;; See the 'LICENSE' file for MIT license text.
;; Also see https://gnu.org/licenses/gpl.html for the full text of GPLv3.
;; Basics
@MatejLach
MatejLach / .zshrc_May14
Last active August 29, 2015 14:01
My (oh-my)-zsh config as of May 2014
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="bira"
# aliases
@MatejLach
MatejLach / .vimrc
Last active August 29, 2015 14:01
Basic ViM setup for Go development - see https://github.com/MatejLach/vim for the full setup & updates
"" The Absolute Must ""
syntax on
set encoding=utf-8
set fileformats=unix,dos,mac " UNIX first
filetype plugin indent on
" pathogen
execute pathogen#infect()
@MatejLach
MatejLach / razer-bwu13-macro.py
Created December 20, 2013 12:36
Razer BlackWidow keyboard - enable macro keys on Linux - updated for the 2013 Ultimate version.
#!/usr/bin/env python2
# blackwidow_enable.py
#
# Enables the M1-5 and FN keys to send scancodes on the Razer BlackWidow
# and BlackWidow Ultimate keyboards.
#
# You can use 'xev' and 'xbindkeys' to assign actions to the macro keys.
#
# Requires the PyUSB library.