Skip to content

Instantly share code, notes, and snippets.

Luca Spiller lucaspiller

Block or report user

Report or block lucaspiller

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
@lucaspiller
lucaspiller / .gitlab-ci.yml
Last active Aug 26, 2019
Rails 5.2 + Docker + Gitlab Continuous Deployment
View .gitlab-ci.yml
image: ruby:2.6
services:
- postgres:11-alpine
variables:
POSTGRES_DB: myorg_test
CONTAINER_IMAGE: registry.gitlab.com/myorg/myapp
stages:
View Gemfile.diff
diff --git a/Gemfile b/Gemfile
index bfc2a1de..8de952c3 100644
--- a/Gemfile
+++ b/Gemfile
@@ -2,9 +2,9 @@ source 'https://rubygems.org'
ruby '2.4.1'
-gem 'rails', '5.0.2'
+gem 'rails', '5.1.0'
View HP Microserver N40L Specs
Disk encryption benchmarks:
$ cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1 352344 iterations per second
PBKDF2-sha256 196215 iterations per second
PBKDF2-sha512 156784 iterations per second
PBKDF2-ripemd160 237449 iterations per second
PBKDF2-whirlpool 73470 iterations per second
# Algorithm | Key | Encryption | Decryption
View gist:d0b012fc5e5e715bfe0c85b41473e180
# pacman -S gnome
:: There are 47 members in group gnome:
:: Repository extra
1) adwaita-icon-theme 2) baobab 3) dconf-editor 4) empathy 5) eog 6) epiphany 7) evince 8) gdm 9) gnome-backgrounds 10) gnome-calculator 11) gnome-contacts
12) gnome-control-center 13) gnome-dictionary 14) gnome-disk-utility 15) gnome-font-viewer 16) gnome-keyring 17) gnome-screenshot 18) gnome-session
19) gnome-settings-daemon 20) gnome-shell 21) gnome-shell-extensions 22) gnome-system-log 23) gnome-system-monitor 24) gnome-terminal 25) gnome-themes-standard
26) gnome-user-docs 27) gnome-user-share 28) grilo-plugins 29) gtk3-print-backends 30) gucharmap 31) gvfs 32) gvfs-afc 33) gvfs-goa 34) gvfs-google 35) gvfs-gphoto2
36) gvfs-mtp 37) gvfs-nfs 38) gvfs-smb 39) mousetweaks 40) mutter 41) nautilus 42) sushi 43) totem 44) tracker 45) vino 46) xdg-user-dirs-gtk 47) yelp
Enter a selection (default=all):
@lucaspiller
lucaspiller / _fields.html.slim
Last active Sep 10, 2018
Reform 2.2 nested form (with support for cocoon gem)
View _fields.html.slim
= f.simple_fields_for :inputs do |input|
= render 'input_fields', f: input
.links
= link_to_add_association f, :inputs, partial: 'input_fields', force_non_association_create: true do
Add
@lucaspiller
lucaspiller / find-test.sh
Created Jul 20, 2016
Lightify GU10 - Pair with Hue hub and test
View find-test.sh
#!/bin/bash
bridgeuser="" # Bridge user, see the API docs for this http://www.developers.meethue.com/documentation/configuration-api#71_create_user
bridgeip="" # Bridge IP address
lamp=$1 # The lamp number, usage ./find-test 5
curl -X POST "http://$bridgeip/api/$bridgeuser/lights"
echo $?
@lucaspiller
lucaspiller / openttd-reddit.rb
Last active Apr 10, 2016
OpenTTD (Reddit Version) Homebrew formula for OS X
View openttd-reddit.rb
# Install like this:
#
# $ brew install https://gist.githubusercontent.com/lucaspiller/29fdd47956dd38a1fc0a1d4fd877b052/raw/openttd-reddit.rb
#
# To symlink to /Applications/OpenTTD.app run:
#
# $ brew linkapps openttd-reddit
#
# Custom game data files / configuration / saves are stored in ~/Documents/OpenTTD/
#
View data.csv
Timestamp Temperature (C) Humidity (RH) Voltage (V)
2016-02-16 03:45:51.530868318 +0000 UTC -3.1 84.8 3.812
2016-02-16 03:50:41.837109716 +0000 UTC -3.1 84.8 3.806
2016-02-16 03:55:31.840826361 +0000 UTC -3.1 85 3.808
2016-02-16 04:00:22.152985775 +0000 UTC -3.1 84.9 3.805
2016-02-16 04:05:12.152659933 +0000 UTC -3.1 85.3 3.807
2016-02-16 04:10:02.032545988 +0000 UTC -3.1 85 3.802
2016-02-16 04:14:52.157674259 +0000 UTC -3.1 84.7 3.799
2016-02-16 04:19:42.160287768 +0000 UTC -3.2 84.5 3.8
2016-02-16 04:24:32.185451128 +0000 UTC -3.2 84.2 3.801
@lucaspiller
lucaspiller / Gemfile
Last active Apr 22, 2016
photos2tidy.rb - scripts to free your photos from Photos.app
View Gemfile
source "httpso://rubygems.org"
gem 'sqlite3'
gem 'exiftool'
View cleanup_branches.sh
#!/bin/sh
# This has to be run from develop
git checkout develop
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
You can’t perform that action at this time.