Skip to content

Instantly share code, notes, and snippets.

@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
@facundovictor
facundovictor / .eslintrc.yaml
Last active April 30, 2019 19:39
Vim configuration file with Vim-Plug, powerline, Syntastic, Nerdtree, and some other nice configs.
---
parser: babel-eslint
parserOptions:
ecmaVersion: 6
sourceType: "module"
ecmaFeatures:
jsx: true
plugins:
- react
env:
@facundovictor
facundovictor / .ctags
Last active March 3, 2016 21:09
Ctags configuration for add Languages support
--exclude=.git
--exclude=node_modules
--exclude=bower_cache
--languages=-JavaScript
--langdef=js
--langmap=js:.js
--regex-js=/^var[ \t]+([a-zA-Z0-9._$]+) = \[/\1/a,array/
--regex-js=/^var[ \t]+([a-zA-Z0-9._$]+) = \{/\1/o,object/
--regex-js=/^var[ \t]+([A-Za-z0-9._$]+)[ \t]*=[ \t]*[A-Za-z0-9_$]+.extend/\1/u,function/
@facundovictor
facundovictor / .gitconfig
Last active August 20, 2021 22:04
My own git shortcuts
[alias]
# Shortcuts
co = checkout
ci = commit
st = status
br = branch
# Get info of a git object
type = cat-file -t
dump = cat-file -p
@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 / Javascript-features.js
Last active July 21, 2016 20:11
This is a practical resume of some JavaScript specifications
/*
@author: Facundo Victor <[email protected]>
_____________________________________________
Using Prototype
__proto__ is the actual object that is used in the lookup chain to resolve
methods, etc. prototype is the object that is used to build __proto__ when
you create an object with new:
*/
@facundovictor
facundovictor / record
Last active May 12, 2017 01:40
Recording screen with ffmpeg
#!/usr/bin/env bash
#
# References:
# - https://trac.ffmpeg.org/wiki/Capture/Desktop
###############################################################################
# -s[:stream_specifier] size
# Better option : -video_size size
RESOLUTION="1366x768"
@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 / tunnel.sh
Last active June 19, 2017 01:23
Easy VPN through SSH
#!/bin/bash
LOCAL_PORT=8080
REMOTE_SERVER=destination.server
REMOTE_USER=user
ssh -D $LOCAL_PORT -f -C -q -N $REMOTE_USER@$REMOTE_SERVER
@facundovictor
facundovictor / vpn_clear.sh
Last active November 20, 2017 13:11
openconnect scripts
#!/usr/bin/env bash
# References:
# https://github.com/dnschneid/crouton/wiki/Using-Cisco-AnyConnect-VPN-with-openconnect
# http://tuxdiary.com/2014/09/04/cisco-anyconnect-vpn-with-openvpn-openconnect/
INTERFACE=tun1
# Clear the tun interface
ifconfig $INTERFACE down