Skip to content

Instantly share code, notes, and snippets.

View jnaraujo's full-sized avatar

Jônatas Araújo jnaraujo

View GitHub Profile
@ixahmedxi
ixahmedxi / settings.json
Created January 2, 2024 08:05
My settings.json
{
"workbench.startupEditor": "none",
"workbench.iconTheme": "moxer-icons",
"workbench.colorTheme": "Aura Dark",
"workbench.settings.editor": "json",
"breadcrumbs.enabled": false,
"explorer.compactFolders": false,
"editor.wordWrap": "bounded",
"editor.tabSize": 2,
"editor.inlineSuggest.enabled": true,
class ListNode {
constructor(value) {
this.value = value
this.next = null
}
}
class LinkedList {
head = null
tail = null
@justinschuldt
justinschuldt / main.go
Created October 27, 2022 13:16
Golang implement encoding.BinaryMarshaler & encoding.BinaryUnmarshaler example
// Golang program to illustrate the implementation of
// a encoding.BinaryMarshaler interface, and
// a encoding.BinaryUnmarshaler interface for a struct.
package main
import (
"bytes"
"encoding/binary"
"fmt"
@teocci
teocci / how-to-ssh-into-windows.md
Created October 13, 2022 08:07
How to SSH into Windows 10 or 11?

How to SSH into Windows 10 or 11?

The latest builds of Windows 10 and Windows 11 include a build-in SSH server and client that are based on OpenSSH. This means now you can remotely connect to Windows 10/11 or Windows Server 2019 using any SSH client, like Linux distros. Let's see how to configure OpenSSH on Windows 10 and Windows 11, and connect to it using Putty or any other SSH client.

OpenSSH is an open-source, cross-platform version of Secure Shell (SSH) that is used by Linux users for a long time. This project is currently ported to Windows and can be used as an SSH server on almost any version of Windows. In the latest versions of Windows Server 2022/2019 and Windows 11, OpenSSH is built-in to the operating system image.

@alexedwards
alexedwards / _tree
Created October 27, 2020 07:40
Config package with global variable
.
├── config
│ └── config.go
├── go.mod
├── go.sum
├── main.go
└── models
└── books
└── books.go
// Discord all events!
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!)
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client
// Learn from this, do not just copy it mofo!
//
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584
// Last Updated -> Halloween 2022
/*
@miguelmota
miguelmota / rsa_util.go
Last active March 11, 2026 17:55
Golang RSA encrypt and decrypt example
package ciphers
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha512"
"crypto/x509"
"encoding/pem"
"log"
)
@DasWolke
DasWolke / microservice bots.md
Last active June 28, 2025 21:57
Microservice bots

Microservice Bots

What they are and why you should use them

Introduction

Recently more and more chatbots appear, the overall chatbot market grows and the platform for it grows as well. Today we are taking a close look at what benefits creating a microservice chatbot on Discord - (a communication platform mainly targeted at gamers) would provide.

The concepts and ideas explained in this whitepaper are geared towards bots with a bigger userbase where the limits of a usual bot style appear with a greater effect

Information about Discord itself

(If you are already proficient with the Discord API and the way a normal bot works, you may skip ahead to The Concept)

@ysangkok
ysangkok / smallqm.js
Created June 4, 2013 16:06
Quine-McCluskey in JavaScript
"use strict";
// from http://stackoverflow.com/a/11454049/309483
var combine = function (m, n) {
var a = m.length, c = '', count = 0, i;
for (i = 0; i < a; i++) {
if (m[i] === n[i]) {
c += m[i];
} else if (m[i] !== n[i]) {