Skip to content

Instantly share code, notes, and snippets.

View opchaves's full-sized avatar
💻
Coding

Paulo Chaves opchaves

💻
Coding
View GitHub Profile
@opchaves
opchaves / aes-256-gcm.go
Created February 10, 2018 13:38 — forked from cannium/aes-256-gcm.go
golang aes-256-gcm
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/hex"
"fmt"
"io"
)
@opchaves
opchaves / hero.ts
Created November 30, 2017 11:26 — forked from brennanMKE/hero.ts
Example of Mongoose with TypeScript and MongoDb
import * as mongoose from 'mongoose';
export let Schema = mongoose.Schema;
export let ObjectId = mongoose.Schema.Types.ObjectId;
export let Mixed = mongoose.Schema.Types.Mixed;
export interface IHeroModel extends mongoose.Document {
name: string;
power: string;
@opchaves
opchaves / cloudSettings
Last active January 31, 2018 19:20
VSCode Settings
{"lastUpload":"2018-01-31T19:20:05.947Z","extensionVersion":"v2.8.7"}
@opchaves
opchaves / README.md
Created March 29, 2017 15:32 — forked from csswizardry/README.md
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vsp **/*<partial file name><Tab>
@opchaves
opchaves / installing-oh-my-zsh-fedora.md
Created February 18, 2017 02:43 — forked from jshcrowthe/installing-oh-my-zsh-fedora.md
Installing Oh My ZSH oh Fedora (2015 CIT 325 Image)

Installing oh-my-zsh on Fedora (for DB class images)

Oh-my-zsh is an extension of the traditional z shell that is extensible via community created plugins (Plugins found here: oh-my-zsh github repo). It is, in my opinion, a breath of fresh air in comparison to the traditional bash shell.

DO THE FOLLOWING IN ORDER

Installing ZSH (using yum)

The first step for this install is getting zsh we will do this via yum. From your terminal:

@opchaves
opchaves / sublime-install.sh
Created February 17, 2017 21:45 — forked from welshstew/sublime-install.sh
sublime text 3 install
#!/bin/sh
SHORTCUT="[Desktop Entry]
Name=Sublime Text 3
Comment=Edit text files
Exec=/usr/local/sublime-text-3/sublime_text
Icon=/usr/local/sublime-text-3/Icon/128x128/sublime_text.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"
@opchaves
opchaves / install-vim8.txt
Last active December 17, 2020 06:47
Install Vim 8 with Python, Python 3, Ruby and Lua support on Ubuntu 16.04
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev
#Optional: so vim can be uninstalled again via `dpkg -r vim`
sudo apt-get install checkinstall
sudo rm -rf /usr/local/share/vim /usr/bin/vim
cd ~
@opchaves
opchaves / sublime-text-setup-ubuntu.md
Created January 19, 2017 15:41
Setting up Sublime Text 3 on Ubuntu

This is a guide to help you install and setup Sublime Text 3 on Ubuntu

The Ubuntu version used is 16.04, but it should be easily adapted to other Ubuntu flavors or even other Linux distros.

First of all, on Ubuntu, you gotta add a ppa

sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer
@opchaves
opchaves / .eslintrc.js
Created January 19, 2017 12:05 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@opchaves
opchaves / Yarn.md
Last active December 30, 2016 14:34

Yarn

Install Yarn

Troubleshooting

On Ubuntu 16.04, after running yarn global add express-generator the command express didn't became available. This hapenned because the path to the binaries wasn't set. If you're using zsh, open your .zshrc and add the following:

export PATH="$PATH:$HOME/.config/yarn/global/node_modules/.bin"