Skip to content

Instantly share code, notes, and snippets.

View lucioreyli's full-sized avatar
:shipit:
bulding something

lucio andrade lucioreyli

:shipit:
bulding something
View GitHub Profile
@jdomzhang
jdomzhang / tls_test.go
Created November 15, 2019 08:50
golang tls connection with TLS 1.2
package onboarding_test
import (
"crypto/tls"
"log"
"net"
"net/http"
"testing"
)

Disable:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Enable:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

@Jabarabo
Jabarabo / githubpull.md
Last active July 28, 2026 23:35
Gist of a stolen gist
@tommysdk
tommysdk / select_java_version
Last active February 20, 2025 15:00
Change default Java version on Mac OS X using Fish shell
# Based on https://stackoverflow.com/a/26252993/1665539
# Show all installed Java versions
/usr/libexec/java_home -V
# Select major version (if unique, otherwise specify full name e.g. 1.8.0_131)
set -x JAVA_HOME (/usr/libexec/java_home -v 1.8)
# Verify
java -version
@siwalikm
siwalikm / aes-256-cbc.js
Last active April 4, 2026 17:01
AES-256-CBC implementation in nodeJS with built-in Crypto library
'use strict';
const crypto = require('crypto');
const ENC_KEY = "bf3c199c2470cb477d907b1e0917c17b"; // set random encryption key
const IV = "5183666c72eec9e4"; // set random initialisation vector
// ENC_KEY and IV can be generated as crypto.randomBytes(32).toString('hex');
const phrase = "who let the dogs out";
var encrypt = ((val) => {
@rordi
rordi / docker-debug.md
Last active July 15, 2024 20:30
Docker debugging an existing image

Debugging a Docker image

Start up the Docker container from image:

docker run --entrypoint "/bin/sh" --rm imagename:latest -c "sleep 24h"

Obtain the container hash id:

docker ps
@dannyge
dannyge / dockerfile
Created July 16, 2016 10:20
docker
docker run --name mysql \
-d -p 9306:3306 \
--restart always \
-v /data/docker/mysql:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=root_pwd \
-e MYSQL_USER=gitlab \
-e MYSQL_PASSWORD=gitlab_db \
-e MYSQL_DATABASE=gitlab \
mysql:latest
@jaydenseric
jaydenseric / ffmpeg-web-video-guide.md
Last active June 2, 2026 21:23
A quick guide to using FFmpeg to create cross-device web videos.

Video conversion with FFmpeg

Install

On mac:

  1. Download the latest release.
  2. Extract the binary and place it in /usr/local/bin.

Command basics

@kelvinst
kelvinst / local-gitignore.md
Last active April 9, 2025 02:03
Como fazer um .gitignore local?

Como fazer um .gitignore local?

Bom, este é um recurso, como muitos outros, bem escondido do git. Então resolvi fazer um post para explicar a situação em que pode-se usar e como fazer essa magia negra. 👻

O problema

Você provavelmente já adicionou algum dia um arquivo no projeto que não deveria ser commitado certo? E como você fez para ignorar esse arquivo mesmo? Provavelmente adicionou no arquivo .gitignore.

OK então, aí você commitou esse arquivo .gitignore e pronto, mais ninguém poderá criar um arquivo com o mesmo nome e commitar. Mas espera aí! Não era isso que você queria! Você só queria ignorar esse arquivo na sua máquina, se alguém, algum dia por obséquio achar esse um nome bom para seu arquivo, que assim seja.

@patrickhammond
patrickhammond / android_instructions.md
Last active May 14, 2026 14:19
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"