Skip to content

Instantly share code, notes, and snippets.

Radu Chiriac raduchiriac

Block or report user

Report or block raduchiriac

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@raduchiriac
raduchiriac / Convert to MP3.sh
Last active Aug 2, 2019
Basic workflow for converting FLAC and WAV files to MP3 straight from the context menu
View Convert to MP3.sh
# 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
@raduchiriac
raduchiriac / agnosterated.zsh-theme
Last active Mar 28, 2019
Custom oh-my-zsh theme with line separator
View agnosterated.zsh-theme
# 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
@raduchiriac
raduchiriac / closures.js
Last active Mar 10, 2016
Understandable Closures
View closures.js
function buildFun(n){
var res = [];
for (var i = 0; i< n; i++){
(function(number){
res.push(function(){
return number;
});
})(i)
}
return res;
View main.scss
// Referencing
.adidas {
.shoe &.dirty {
color: red;
}
}
// Logs
@warn "Key not found.";
@raduchiriac
raduchiriac / ch1.js
Last active Feb 22, 2016
JavaScript is Beautiful (w/ a little ES6 make-up)
View ch1.js
// 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
You can’t perform that action at this time.