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
#!/bin/sh | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
} | |
current_branch=$(parse_git_branch) | |
if [[ -n "$current_branch" ]]; then | |
git fetch -v upstream | |
git checkout master |
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
# Probaby windows with msys (old times) | |
alias ls='ls -A --color=yes' | |
alias dir='ls -A --color=yes' | |
alias vi='vim' | |
alias gb='git branch' | |
alias gba='git branch -a' | |
alias gc='git commit -v' | |
alias gfu='git fetch upstream master:upstream' | |
alias gf='git fetch origin master:remote-master' | |
alias gp='git push' |
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
struct Person; | |
impl Person { | |
fn hello(&self) -> &'static str { | |
return "hello"; | |
} | |
} | |
fn main() { | |
println!("Hello, world!"); | |
let p = Person; |
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
#!/bin/bash | |
# | |
# The MIT License | |
# | |
# Copyright 2014 Jakub Jirutka <jakub@jirutka.cz>. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
%s/\(:\)\(\S\+\)\s\+=>/\2:/ |
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
before_filter :find_position, only: [:show, :destroy, :edit] | |
def destroy | |
if @position.destroy | |
flash[:success] = t('labels.success') | |
else | |
flash[:error] = t('labels.error') | |
end | |
redirect_to positions_path | |
end |
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
{ | |
"title": "Escape enhancements", | |
"rules": [ | |
{ | |
"description": "Escape toggles capslock if enabled", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "escape", |
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
1 |