Skip to content

Instantly share code, notes, and snippets.

View VinGarcia's full-sized avatar
💭
I may be slow to respond.

Vinícius Garcia VinGarcia

💭
I may be slow to respond.
  • Belo Horizonte - MG, Brazil
View GitHub Profile
@shaneutt
shaneutt / LICENSE
Last active April 14, 2024 00:52
Golang: Demonstrate creating a CA Certificate, and Creating and Signing Certs with the CA
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@ygotthilf
ygotthilf / jwtRS256.sh
Last active April 17, 2024 04:10
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@rhossi
rhossi / s3upload.js
Created July 30, 2015 18:22
Uploading files to S3 validating ContentMD5 using AWS SDK for Node.js
var aws = require('aws-sdk'),
fs = require('fs'),
crypt = require("crypto");
function getMD5HashFromFile(file){
var hash = crypt.createHash("md5")
.update(file)
.digest("base64");
return hash;
}
@kethinov
kethinov / walksync.js
Created September 22, 2013 09:04
List all files in a directory in Node.js recursively in a synchronous fashion
// List all files in a directory in Node.js recursively in a synchronous fashion
var walkSync = function(dir, filelist) {
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(dir + file).isDirectory()) {
filelist = walkSync(dir + file + '/', filelist);
}
else {