Skip to content

Instantly share code, notes, and snippets.

View Shazambom's full-sized avatar
💫

Ian Moreno Shazambom

💫
View GitHub Profile
@Shazambom
Shazambom / init.vim
Created January 23, 2023 07:10
NeoVim config, work in progress
set path+=**
set modelines=0
set autoread
au FocusGained,BufEnter * :silent! !
set encoding=utf-8
set visualbell
set backspace=indent,eol,start
set nobackup
set noswapfile
set relativenumber
@Shazambom
Shazambom / decode.js
Created July 28, 2022 21:27
Decode a byte string in base64 and inflate it using zip
import pako from "pako";
decode = async (base64) => {
let bin = window.atob(base64)
let bytes = new Uint8Array(bin.length)
for (let i = 0; i < bin.length; i++) {
bytes[i] = bin.charCodeAt(i);
}
let data = String.fromCharCode.apply(null, new Uint16Array(pako.inflate(bytes)));
return JSON.parse(data);
@Shazambom
Shazambom / main.go
Last active July 31, 2023 00:03
An Example of how to use RabbitMQ's Direct Reply-To feature in Golang using github.com/streadway/amqp
package main
import (
"errors"
"fmt"
"github.com/streadway/amqp"
"log"
"math/rand"
"strconv"
)
@Shazambom
Shazambom / Main
Created May 5, 2014 04:03
The Main Class of my Game of Life program
import java.awt.*;
import java.awt.event.ActionListener;
import javax.swing.*;
/* Main issue currently:
* Applet Time
*/
public class Main
{
private static final int FRAME_WIDTH = 1000;
private static final int FRAME_HEIGHT = 750;