This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"" The Absolute Must "" | |
syntax on | |
set encoding=utf-8 | |
set fileformats=unix,dos,mac " UNIX first | |
filetype plugin indent on | |
" pathogen | |
execute pathogen#infect() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
println!("Hello Rust!"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Solution to Project Euler problem 1, | |
// https://projecteuler.net/problem=1 | |
fn main() { | |
let (i, result) = (0i, 0i); | |
while i < 1000 { | |
if i%3 == 0 || i%5 == 0 { result += i } | |
i += 1 | |
} | |
println!("{}", result); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let x = 3.75f64; | |
match x { | |
1.0..1.99 => println!("x is between one and two"), | |
2.0..2.99 => println!("x is between two and three"), | |
3.0..3.99 => println!("x is between three and four"), | |
4.0..4.99 => println!("x is between four and five"), | |
5.0..5.99 => println!("x is between five and six"), | |
_ => println!("x is bigger than five") // catches all other possible values of `x` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let lang = "Rust"; | |
if lang == "Rust" { | |
println!("The next-gen systems programming language!"); | |
} else if lang == "Haskell" { | |
println!("A high-level, purely functional programming language."); | |
} else if lang == "Elixir" { | |
println!("Another aspiring, functional language."); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
let lang = "Rust"; | |
let rust_is_amazing = true; | |
let mut count = 0i; | |
for _ in range(0i, 5) { | |
while count < 10 && rust_is_amazing == true { | |
println!("Is, {} amazing? {}", lang, rust_is_amazing); | |
count += 1; | |
} |
OlderNewer