Skip to content

Instantly share code, notes, and snippets.

View AD0791's full-sized avatar
🎯
Focusing

Alexandro Disla AD0791

🎯
Focusing
View GitHub Profile
@AD0791
AD0791 / destructuring.md
Created December 13, 2019 19:29 — forked from yang-wei/destructuring.md
Elm Destructuring (or Pattern Matching) cheatsheet

Should be work with 0.18

Destructuring(or pattern matching) is a way used to extract data from a data structure(tuple, list, record) that mirros the construction. Compare to other languages, Elm support much less destructuring but let's see what it got !

Tuple

myTuple = ("A", "B", "C")
myNestedTuple = ("A", "B", "C", ("X", "Y", "Z"))
@AD0791
AD0791 / NERDTree Commands
Created December 20, 2019 16:19 — forked from adamdb/NERDTree Commands
A list of useful NERDTree commands.
Use the natural Vim navigation keys hjkl to navigate the files.
Press o to open the file in a new buffer or open/close directory.
Press t to open the file in a new tab.
Press i to open the file in a new horizontal split.
Press s to open the file in a new vertical split.
Press p to go to parent directory.
Press r to refresh the current directory.
Press m to launch NERDTree menu inside Vim.
@AD0791
AD0791 / vim_jupyter.MD
Created December 20, 2019 16:29
Jupyter Lab vim

Install or upgrade

jupyter labextension install jupyterlab_vim

Uninstall

jupyter labextension uninstall jupyterlab_vim
@AD0791
AD0791 / vim-shortcuts.md
Created December 20, 2019 16:34 — forked from tuxfight3r/vim-shortcuts.md
VIM SHORTCUTS

VIM KEYBOARD SHORTCUTS

MOVEMENT

h        -   Move left
j        -   Move down
k        -   Move up
l        -   Move right
$        -   Move to end of line
0        -   Move to beginning of line (including whitespace)
@AD0791
AD0791 / GCI-Task-LoginPage.md
Created February 5, 2020 17:30 — forked from PolBaladas/GCI-Task-LoginPage.md
Creating a Login Page with Python Flask and SQLite 3 DB.

Login page using Python, Flask and sqlite3 DB

How-to guide

(Task for GCI 2015-16) Year: 2015-16 This guide will show how to create a simple login page with Flask (a python microframework) and a sqlite3 database.

1. Database Schema and Models

As we are creating a simple user login app we need to store 2 basic values in the database: the username and the password. In order to build the database we need to define a schema:

Remove previous versions of PostgreSQL
brew uninstall --force postgresql
Delete all Files of Postgres
rm -rf /usr/local/var/postgres
Install Postgres with Homebrew
brew install postgres
Install PostGIS with Homebrew
brew install postgis
Start PostgreSQL server
pg_ctl -D /usr/local/var/postgres start
0 " Specify a directory for plugins
1 call plug#begin('~/.vim/plugged')
2 Plug 'sheerun/vim-polyglot'
3 Plug 'neoclide/coc.nvim', {'branch': 'release'}
4 Plug 'scrooloose/nerdtree'
5 "Plug 'tsony-tsonev/nerdtree-git-plugin'
6 Plug 'Xuyuanp/nerdtree-git-plugin'
7 Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
8 Plug 'ryanoasis/vim-devicons'
9 Plug 'airblade/vim-gitgutter'
let $M_TUI_ENABLE_TRUE_COLOR=1
1
2
3
4 Plugin 'ryanoasis/vim-devicons'
5
6 Plugin 'altercation/vim-colors-solarized'
7
8
9 syntax enable
@AD0791
AD0791 / gist:74d7fde4f45d128366a29c86442a7e63
Last active February 20, 2020 17:43
nvim / plug / powerlevel9k / fonts / iterm
install newest version of iterm
install nvim. (see vplug)
before : get plug manager
https://github.com/junegunn/vim-plug/wiki/tutorial
# nerd fonts
brew tap homebrew/cask-fonts
brew cask install font-hack-nerd-font
from: https://github.com/ryanoasis/nerd-fonts
@AD0791
AD0791 / server.js
Last active June 14, 2020 18:47
simple web server with http and http-status-code in nodeJS
// npm init
// npm i http -S
// npm i http-status-codes -S
const port = 9000;
const http = require('http');
const httpStatus = require('http-status-codes');