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 | |
# Get the current branch name | |
current_branch=`git rev-parse --abbrev-ref HEAD` | |
# Search Jira ID in a pattern such a "feature/ABCD-123-my-feature" | |
id=$(echo $current_branch | sed -nE 's,[a-z]+/([A-Z]+-[0-9]+)-.+,\1,p') | |
# only prepare commit message if pattern matched and jiraId was found | |
if [[ ! -z $id ]]; then |
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
# Make sure you have ffmpeg installed (`brew install ffmpeg`) | |
#!/bin/bash | |
for f in "$@"; | |
do | |
if [[ $f == *.flac ]]; then | |
/usr/local/bin/ffmpeg -i "$f" -vn -ab 320k -map_metadata 0 -id3v2_version 3 "${f%.flac}.mp3" | |
fi | |
if [[ $f == *.wav ]]; then |
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
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a | |
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). | |
# Make sure you have a recent version: the code points that Powerline |
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
function buildFun(n){ | |
var res = []; | |
for (var i = 0; i< n; i++){ | |
(function(number){ | |
res.push(function(){ | |
return number; | |
}); | |
})(i) | |
} | |
return res; |
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
// Referencing | |
.adidas { | |
.shoe &.dirty { | |
color: red; | |
} | |
} | |
// Logs | |
@warn "Key not found."; |
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
// Smart decider | |
var age = 20; | |
age >= 18 && console.log( "You are allowed to play this game" ); // TRUE | |
age >= 18 || console.log( "The game is restricted to 18 and over" ); // FALSE | |
function fn( cb ) { | |
cb && cb(); | |
}; | |
// Configuring a new Object |