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
macro_rules! hashmap { | |
(@opts nocap $hash:tt capacity: $cap:expr $(, $($tail:tt)*)?) => (hashmap!(@opts $cap $hash $($($tail)*)?)); | |
(@opts $cap:tt nohash S: $hash:ty $(, $($tail:tt)*)?) => (hashmap!(@opts $cap (<$hash>::default()) $($($tail)*)?)); | |
(@opts $cap:tt nohash hasher: $hash:expr $(, $($tail:tt)*)?) => (hashmap!(@opts $cap $hash $($($tail)*)?)); | |
(@opts $cap:tt $hash:tt $name:ident: $($tail:tt)*) => (compile_error!(concat!("Invalid option: ", stringify!($name)))); | |
(@opts $cap:tt $hash:tt) => (hashmap!(@init $cap $hash)); | |
(@opts $cap:tt $hash:tt $($key:expr => $value:expr),+ $(,)?) => { | |
{ | |
let mut map = hashmap!(@init $cap $hash $($key)*); |
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 zsh | |
setopt EXTENDED_GLOB | |
# get list of all merged branches | |
branches=(${(f)"$(git branch --format '%(refname:short)' --merged)"}) | |
# remove current branch | |
current=("$(git branch --show-current)") | |
branches=(${branches:|current}) | |
# remove master|develop branches |
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
/* | |
* Copyright (C) 2014 skyfish.jy@gmail.com | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |