Skip to content

Instantly share code, notes, and snippets.

View gipi's full-sized avatar
😎
code for food

Gianluca Pacchiella gipi

😎
code for food
View GitHub Profile
@gipi
gipi / README.md
Created April 16, 2016 07:44
#golang

Golang

In order to install stuffs you can use

$ go get -v github.com/opencontainers/runc/libcontainer

(the -v flag is needed to make the command show output).

@gipi
gipi / 000.md
Created January 31, 2016 16:40
#printing

Booklet

Inspired by this post

$ pdftops -level3 Handbook_of_Computability_Theory.pdf - | psbook | psnup -2 | ps2pdf - booklet.pdf
[*] [1] [2] [*] [34] [3] [4] [33] [32] [5] [6] [31] [30] [7] [8] [29] [28] 
[9] [10] [27] [26] [11] [12] [25] [24] [13] [14] [23] [22] [15] [16] [21] 
[20] [17] [18] [19] Wrote 36 pages, 3968134 bytes
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] 
@gipi
gipi / 000.md
Created January 25, 2016 09:22
#randr
$ xrandr --current
Screen 0: minimum 8 x 8, current 1920 x 1200, maximum 32767 x 32767
eDP1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1366x768       60.0*+   39.9  
   1360x768       59.8     60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
DP1 disconnected (normal left inverted right x axis y axis)
@gipi
gipi / 000.md
Last active February 1, 2016 21:49
#machinelearning

Installing scikit-learn

# sudo apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortran
$ pip install numpy
$ pip install scipy
$ pip install scikit-learn
@gipi
gipi / 000.md
Last active January 29, 2016 09:21
#ruby
# apt-get install ruby1.9.1-dev
$ gem install --user jekyll
#  update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby2.0 1
update-alternatives: using /usr/bin/ruby2.0 to provide /usr/bin/ruby (ruby) in auto mode

Manually

$ curl -sSL https://rvm.io/mpapis.asc | gpg --import -
$ curl -L https://get.rvm.io | bash -s stable --rails
@gipi
gipi / 000.md
Last active January 10, 2016 17:25
#gpg2
$ gpg2 --list-key --with-colons gp@ktln2.org
tru::1:1452083118:1489574824:3:1:5
pub:u:2048:1:FC8153E07D957F45:1452083023:::u:::scESC:::::::
uid:u::::1452083023::D421FF35F90CA954185A138F411E13645EF7A812::Gianluca Pacchiella <gp@ktln2.org>:::::::::
sub:u:2048:1:532EB870178BEFE9:1452083023::::::e::::::

$ gpg2 --armor --encrypt --recipient gp@ktln2.org <file>

$ gpg2 --decrypt

@gipi
gipi / 000.md
Last active December 2, 2016 22:17
#ffmpeg