Skip to content

Instantly share code, notes, and snippets.


Fabio Yamate fabioyamate

View GitHub Profile
fabioyamate / mover
Last active Feb 8, 2022
unRAID mover script
View mover
# This is the 'mover' script used for moving files from the cache disk to the
# main array. It is typically invoked via cron.
# After checking if it's valid for this script to run, we check each of the top-level
# directories (shares) on the cache disk. If, and only if, the 'Use Cache' setting for the
# share is set to "yes", we use 'find' to process the objects (files and directories) of
# that directory, moving them to the array.
fabioyamate / sr.bash
Created Apr 26, 2012
Replacing string in with sed
View sr.bash
# replaces all string matches in files
# sr $from $to
# sr $from $to $type
# Arguments:
# $from - from value
# $to - to value
# $type - file type. DEFAULT: *.rb
View sha-256-hex-password
# TODO would it be possible to write in one line?
echo "Password: "
read -s password
echo -n $password | openssl dgst -sha256 -binary | xxd -p
fabioyamate / nokogiri
Created Jun 18, 2010
nokogiri installation from libxml2 and libxslt macosx
View nokogiri
# using rvm with ruby-1.8.7-p249
# latest version 2.7.7 2010-06-17
brew install libxml2
# installing libxslt from source code
./configure --prefix=/usr/local/Cellar/libxslt/1.1.26 --with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.7
sudo make install
fabioyamate / curb_ubuntu.txt
Created Nov 11, 2010
installing curb on ubuntu 10.04
View curb_ubuntu.txt
# installing curb gem on Ubuntu require libcurl
sudo apt-get install libcurl3-dev
Or new version, but it conflicts if some libraries.
sudo apt-get install libcurl4-dev
(some other packages libcurl4-openssl-dev libcurl4-gnutls-dev)
gem install curb
fabioyamate / promise.js
Created Jun 9, 2014
Promise polyfill with jQuery Deferreds
View promise.js
function Promise(fn) {
this.promise = $.Deferred(function(dfd) {
Promise.prototype.then = function(done, fail) {
this.promise.then(done, fail);
View xmobarrc
Config { font = "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*"
, borderColor = "black"
, border = TopB
, bgColor = "black"
, fgColor = "grey"
, position = TopW L 100
, commands = [ Run Network "eth0" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Network "eth1" ["-L","0","-H","32","--normal","green","--high","red"] 10
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
cat <(`dd bs=1024 count=64 if=$foo`) <(`tail -c 65536 $foo`) | md5
fabioyamate /
Created Feb 21, 2016
keybase prove github

Keybase proof

I hereby claim:

  • I am fabioyamate on github.
  • I am fabioyamate ( on keybase.
  • I have a public key ASCozQOWUcCj_hY3NCJ60wJIR0BMIfMVE5AVlC8I_PCkCgo

To claim this, I am signing this object:

fabioyamate / alias.bash
Last active Feb 20, 2016
jQuery, AngularJS snippet to start working
View alias.bash
# Add an alias to your .bash_profile
# alias sjquery='curl -L -o'
# alias sangular='curl -L -o'
# Updates:
# * using service to include files directly from server
# Usage