Skip to content

Instantly share code, notes, and snippets.

Avatar

Renato Francia Castillo rmfranciacastillo

View GitHub Profile
View Web Debugger link
@rmfranciacastillo
rmfranciacastillo / myscript.sh
Created Feb 11, 2020 — forked from bradtraversy/myscript.sh
Basic Shell Scripting
View myscript.sh
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
@rmfranciacastillo
rmfranciacastillo / .vimrc
Last active Jan 26, 2020
A simple .vimrc file I use to develop
View .vimrc
"NeoBundle Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath+=/home/renato/.vim/bundle/neobundle.vim/
" Required:
call neobundle#begin(expand('/home/renato/.vim/bundle'))
View .bashrc
#!/bin/bash
# If not running interactively, don't do anything.
# This snippet helps to fix scp, sftp "Received message too long" issue..
[ -z "$PS1" ] && return
# Source global definitions
[ -f /etc/bashrc ] && . /etc/bashrc
[ -f /etc/profile ] && . /etc/profile
View .bashrc
#!/bin/bash
# If not running interactively, don't do anything.
# This snippet helps to fix scp, sftp "Received message too long" issue..
[ -z "$PS1" ] && return
# Source global definitions
[ -f /etc/bashrc ] && . /etc/bashrc
[ -f /etc/profile ] && . /etc/profile
@rmfranciacastillo
rmfranciacastillo / docker-help.md
Created Mar 15, 2019 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips
View docker-help.md

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@rmfranciacastillo
rmfranciacastillo / .eslintrc.json for node module development
Created Feb 26, 2019
This is a .eslintrc.json configuration used to develop a sample module
View .eslintrc.json for node module development
{
"parserOptions": {
"ecmaVersion": 2018,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"env": {
@rmfranciacastillo
rmfranciacastillo / Flatten JS array
Created Jan 16, 2019
Flattens an Array using JS
View Flatten JS array
let arr = [[1,2,[3]], [[[4]]]];
let flatten = arr.reduce((acc, value) => acc.concat(value), []);
while(flatten.some((item) => Array.isArray(item))){
console.log(flatten);
flatten = flatten.reduce((acc, value) => acc.concat(value), []);
}
console.log(flatten)
@rmfranciacastillo
rmfranciacastillo / ssh.md
Created Dec 3, 2018 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets
View ssh.md

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

You can’t perform that action at this time.