Skip to content

Instantly share code, notes, and snippets.

Luca Spiller lucaspiller

View GitHub Profile
@lucaspiller
lucaspiller / .gitlab-ci.yml
Last active Jul 7, 2020
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 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
@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 / auto-save-remote-images.php
Created Feb 19, 2014
Auto Save Remote Images WP Plugin
View auto-save-remote-images.php
<?php
/*
Plugin Name: Auto Save Remote Image
Plugin URI: http://www.devsaab.com/wordpress/
Description: This plugin automatically downloads the first remote image from a post and sets it as the featured image.
Version: 1.3
Author: Prebhdev Singh
Disclaimer: No warranty or guarantee of any kind! Use this in your own risk.
*/
add_action('publish_post', 'fetch_images');
@lucaspiller
lucaspiller / gist:7371780
Created Nov 8, 2013
GitHub.app git and Homebrew git conflict
View gist:7371780
$ brew install git
zsh: correct 'git' to '.git' [nyae]? n
Warning: A newer Command Line Tools release is available
Update them from Software Update in the App Store.
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/git-1.8.4.2.mavericks.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/git-1.8.4.2.mavericks.bottle.tar.gz
==> Pouring git-1.8.4.2.mavericks.bottle.tar.gz
==> Caveats
The OS X keychain credential helper has been installed to:
/usr/local/bin/git-credential-osxkeychain
@lucaspiller
lucaspiller / Building Blink on OS X.md
Last active Aug 24, 2017
Building Blink on OS X
View Building Blink on OS X.md
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 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):
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
@lucaspiller
lucaspiller / never_gonna.ws
Created Jun 1, 2012
Never Gonna Give You Up (Whitespace)
You can’t perform that action at this time.