Skip to content

Instantly share code, notes, and snippets.

@facundovictor
facundovictor / destructuring.js
Created December 12, 2018 22:57 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
@facundovictor
facundovictor / config.yml
Created May 17, 2017 00:17
Parse YAML from bash with sed and awk.
development:
adapter: mysql2
encoding: utf8
database: my_database
username: root
password:
apt:
- somepackage
- anotherpackage
@facundovictor
facundovictor / README.md
Last active July 7, 2016 17:51 — forked from ivanalejandro0/swapon.service
Swap service for CoreOS

swapon.service

A auto swap file configured in a single systemd service.

  1. Copy the service into: /etc/systemd/system/swapon.service
  2. Load the service:systemctl enable /etc/systemd/system/swapon.service
  3. Start the service: systemctl start swapon

Considerations before swapon:

  • The file must be in a partition with enough space
@facundovictor
facundovictor / .tmux.conf
Last active April 7, 2016 17:06 — forked from ivanalejandro0/.tmux.conf
Tmux configuration file with Powerline-like status bar, system clipboard integration and some other nice tweaks.
source "/usr/share/tmux/powerline.conf"
# Thanks to:
# http://blog.yjl.im/2009/11/migrating-to-tmux-from-gnuscreen.html
# https://gist.github.com/ivanalejandro0/7459223
# 0 is too far
set -g base-index 1
#Disable window auto renaming