Skip to content

Instantly share code, notes, and snippets.

View BuonOmo's full-sized avatar
🥊
—(ಠ益ಠ)ノ

Ulysse Buonomo BuonOmo

🥊
—(ಠ益ಠ)ノ
View GitHub Profile
@BuonOmo
BuonOmo / man-gem.zsh
Last active November 28, 2016 04:07
Create man pages with gem help
#!/bin/zsh
# Copyright (C) 2016 Ulysse Buonomo <buonomo.ulysse@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@BuonOmo
BuonOmo / load-images.zsh
Created October 31, 2016 06:11
Take a bunch of images from unsplash.it/ and copy it in files
# List of image ratio, every image should be <width>-<height>
list=(100-100 50-100 100-50 60-200 800-600)
# Options for unsplash, & separated (random, blur..)
opts="random&blur"
for i in $list;do ~/Images/unsplash
l=($(echo $i | tr '-' ' '))
curl --output $i.jpg "https://unsplash.it/$l[1]/$l[2]?$opts"
done
@BuonOmo
BuonOmo / wallpaper.sh
Created October 18, 2016 01:03
Change wallpaper randomly using unsplash.it API.
#!/bin/sh
#
# Change definition of the screen on line 6.
file=$(mktemp /tmp/wallpaper.XXX.jpg)
curl --output $file 'https://unsplash.it/1920/1080/?random'
gsettings set org.gnome.desktop.background picture-uri file://$file
@BuonOmo
BuonOmo / referenceVsParameter.js
Created October 17, 2016 00:28
How to pass var by parameter or reference in javascript
/* =================================
Pass by parameter
================================= */
function par(e) {
e = "bar";
}
var a = "foo";
par(a);
console.log("a: "+a); // "foo"

Keybase proof

I hereby claim:

  • I am BuonOmo on github.
  • I am ulysse (https://keybase.io/ulysse) on keybase.
  • I have a public key ASDbVJjf42fm6IxIB-ZXs73n7JTntl9GQXWlHCI9C7ybcQo

To claim this, I am signing this object:

@BuonOmo
BuonOmo / install-ungit.sh
Last active March 2, 2020 07:10
install ungit on Ubuntu 16.04
sudo apt-get install nodejs-legacy nodejs npm
npm config set prefix ~/npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo -H npm install -g ungit