Skip to content

Instantly share code, notes, and snippets.

@thales17
thales17 / FIX.md
Created July 9, 2019 14:21
Zoom Fix
@thales17
thales17 / encrypt.js
Last active July 30, 2019 15:53
RSA Public/Private Key Node Go
const crypto = require('crypto');
const fs = require('fs');
buffer = Buffer.from('albuquerque');
fs.readFile('mykey.pub.pem', 'utf8', function(err, data) {
if (err) throw err;
console.log(data);
let key = {key: data, padding: crypto.constants.RSA_PKCS1_PADDING};
let encrypted = crypto.publicEncrypt(key, buffer);
console.log(encrypted.toString('base64'));
@thales17
thales17 / index.html
Created September 4, 2019 18:55
WebAudio Oscillator Example
<html>
<head>
</head>
<body>
<script type="text/javascript">
@thales17
thales17 / Embed_lua.c
Last active June 9, 2020 15:43
Embedding Lua Scripts into C programs
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
int count = 0;
void error (lua_State *L, const char *fmt, ...) {