Skip to content

Instantly share code, notes, and snippets.

View miguelcostero's full-sized avatar
💻

Miguel Costero miguelcostero

💻
View GitHub Profile
@miguelcostero
miguelcostero / init.vim
Created November 15, 2020 18:19 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@miguelcostero
miguelcostero / awc-ecs-access-to-aws-efs.md
Created February 4, 2019 22:41 — forked from duluca/awc-ecs-access-to-aws-efs.md
Step-by-step Instructions to Setup an AWS ECS Cluster

Configuring AWS ECS to have access to AWS EFS

If you would like to persist data from your ECS containers, i.e. hosting databases like MySQL or MongoDB with Docker, you need to ensure that you can mount the data directory of the database in the container to volume that's not going to dissappear when your container or worse yet, the EC2 instance that hosts your containers, is restarted or scaled up or down for any reason.

Don't know how to create your own AWS ECS Cluster? Go here!

New Cluster

Sadly the EC2 provisioning process doesn't allow you to configure EFS during the initial config. After your create your cluster, follow the guide below.

New Task Definition for Web App

If you're using an Alpine-based Node server like duluca/minimal-node-web-server follow this guide:

@miguelcostero
miguelcostero / lock.sh
Created October 20, 2018 01:39
i3lock screen lock
#!/bin/bash
scrot /tmp/screen.png
xwobf -s 11 /tmp/screen.png
i3lock -i /tmp/screen.png
rm /tmp/screen.png
@miguelcostero
miguelcostero / .eslintignore
Created October 12, 2018 21:29 — forked from remy/.eslintignore
My Next.js eslint config + `npm install --save-dev eslint eslint-config-airbnb eslint-plugin-react`
.next
out
@miguelcostero
miguelcostero / remount.sh
Created September 24, 2018 03:48 — forked from ertseyhan/remount.sh
Temporarily increase size of tmp folder on Arch linux
#!/bin/bash
sudo mount -o remount,size=10G,noatime /tmp
echo "Done. Please use 'df -h' to make sure folder size is increased."
@miguelcostero
miguelcostero / app.module.ts
Created August 17, 2018 02:40 — forked from pniel-cohen/app.module.ts
Dynamically set page title based on active route in Angular 4
import ...
@NgModule({
...
providers: [ TitleService ],
})
export class AppModule {
constructor(titleService: TitleService) {
titleService.init();
}
@miguelcostero
miguelcostero / .tmux.conf
Created June 3, 2018 23:59
tmux configuration | by: @tquizzle
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# split panes using | and -
bind | split-window -h

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@miguelcostero
miguelcostero / gist:a9dc85b9d03f05d1fd1f6126792947bb
Created November 14, 2017 10:56 — forked from paulallies/gist:0052fab554b14bbfa3ef
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master