Skip to content

Instantly share code, notes, and snippets.

View opchaves's full-sized avatar

Paulo Chaves opchaves

View GitHub Profile
@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 / cloudSettings
Last active January 31, 2018 19:20
VSCode Settings
{"lastUpload":"2018-01-31T19:20:05.947Z","extensionVersion":"v2.8.7"}
@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 / 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 / main.go
Created February 10, 2018 14:21 — forked from manishtpatel/main.go
GoLang Encrypt string to base64 and vice versa using AES encryption.
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"encoding/base64"
"fmt"
"io"
)
@opchaves
opchaves / crypto-ctr.js
Created February 13, 2018 00:55 — forked from chris-rock/crypto-ctr.js
Encrypt and decrypt text in nodejs
// Part of https://github.com/chris-rock/node-crypto-examples
// Nodejs encryption with CTR
var crypto = require('crypto'),
algorithm = 'aes-256-ctr',
password = 'd6F3Efeq';
function encrypt(text){
var cipher = crypto.createCipher(algorithm,password)
var crypted = cipher.update(text,'utf8','hex')
@opchaves
opchaves / .dockerignore
Created July 18, 2020 17:59 — forked from NogaMan/.dockerignore
Gatsby Dockerfile
.cache/
node_modules/
public/
@opchaves
opchaves / install-nvim.appimage.md
Created February 20, 2021 14:15
How to install the latest release of NeoVim in your Ubuntu system (it also works if you're using WSL 2)

Remove neovim if you have it in your system

sudo apt remove --purge neovim
sudo apt autoremove

Download nvim.appimage

@opchaves
opchaves / docker-compose-mongodb.yml
Created December 9, 2021 17:03
Using Docker and Docker Compose
version: '3.7'
services:
mongodb:
image: mongo:5
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
ports:
- 27017:27017
volumes: