Skip to content

Instantly share code, notes, and snippets.

View Luisangonzalez's full-sized avatar

Luis Antonio González Martín Luisangonzalez

View GitHub Profile
@Luisangonzalez
Luisangonzalez / index.js
Created September 17, 2019 17:50
Print keys and values of an object
printKeysAndValuesOfObject = (obj) => {
Object.keys(obj).forEach(a => {
console.log(`${a}: `, obj[a.toString()])
if (a.hasOwnProperty(obj[a.toString()])) {
printKeysAndValuesOfObject(obj[a.toString()])
}
})
}
@Luisangonzalez
Luisangonzalez / Synology-Diskstation-Git.md
Created March 6, 2019 21:23 — forked from walkerjeffd/Synology-Diskstation-Git.md
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@Luisangonzalez
Luisangonzalez / init.vim
Created August 21, 2018 18:02
Neovim settings ~/.config/nvim/init.vim
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.local/share/nvim/plugged')
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/syntastic'
Plug 'davidhalter/jedi-vim'
Plug 'w0rp/ale'
@Luisangonzalez
Luisangonzalez / TerminatorCheatSheet.md
Created May 5, 2018 08:33
Terminator Cheat Sheet

Terminator Cheat Sheet

Splitting Windows

Command Action
Ctrl+Shift+E vertical split
Ctrl+Shift+O horizontal split
Alt+ArrowKeys Navigate terminals
@Luisangonzalez
Luisangonzalez / Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Created March 2, 2018 18:23 — forked from IamAdiSri/Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Setting up and using Python3, Pip3, Virtualenv (for Python3) and Virtualenvwrapper (for Python3)
First install pip for Python2. Download the get-pip.py file from https://bootstrap.pypa.io/get-pip.py
$ cd <download location>
$ sudo -H python ./get-pip.py
Installing pip also installs Python3
To run Python3
$ python3
Install pip3 by just executing the same file as in the step above, but this time using Python3
$ sudo -H python3 ./get-pip.py
@Luisangonzalez
Luisangonzalez / example.js
Created December 1, 2017 12:35
example test
it('GET /api/oneData', (done) => {
request(app)
.get('/api/oneData')
.expect('Content-Type', 'plain/text')
.expect((response) => {
console.log(response)})
.end(done);
});
@Luisangonzalez
Luisangonzalez / .zshrc
Created November 6, 2017 19:46
My .zshrc
# Path to your oh-my-zsh installation.
export ZSH=/home/lagonzalez/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Uncomment the following line to use case-sensitive completion.
@Luisangonzalez
Luisangonzalez / git-cheat.md
Created December 26, 2016 11:34 — forked from slok/git-cheat.md
Git cheat commands

Resumen de comandos de Git

Configurar git:

$ git config --global user.name "Xabier Larrakoetxea"  
$ git config --global user.email [email protected]  
$ git config --global merge.tool [el programa que queramos, yo usaria: diffuse]  

$ git config --global color.ui true

package cache;
public class Cache {
public static void accesoMemoria(){
int[] array;
array= new int[4194304];
int contador=0;
for(int j=0;j<=16;j++){