Skip to content

Instantly share code, notes, and snippets.

@AcidLeroy
AcidLeroy / init.vim
Last active June 17, 2022 17:54
My nvim config file (~./config/nvim)
call plug#begin()
Plug 'https://github.com/easymotion/vim-easymotion.git'
Plug 'tpope/vim-sensible'
Plug 'nathanaelkane/vim-indent-guides'
call plug#end()
map ,, <Plug>(easymotion-prefix)
@AcidLeroy
AcidLeroy / kafka_publisher.js
Last active November 12, 2020 14:01
Server side event throughput client test for RIG.
const uuid = require('uuid');
var kafka = require('kafka-node')
const kafkaHost = process.env.KAFKA_HOST || "localhost:9092";
HighLevelProducer = kafka.HighLevelProducer,
client = new kafka.KafkaClient({
kafkaHost: kafkaHost
});
console.log(`Publishing to kafka host "${kafkaHost}"`);
@AcidLeroy
AcidLeroy / bisect.cpp
Created March 30, 2020 23:58
Microsoft Bisect interview question
#include <vector>
#include <iostream>
#define PASSED 0
#define FAILED 1
using namespace std;
int bisect(const vector<int> &v, int l, int r) {
@AcidLeroy
AcidLeroy / resume.json
Last active June 1, 2023 02:49
My resume
{
"meta": { "theme": "elegant" },
"basics": {
"name": "Cody Wilson Eilar",
"label": "Staff Software Engineer",
"picture": "",
"email": "[email protected]",
"phone": "(505) 514-5961",
"website": "https://codyeilar.com",
"summary": "I develop cloud native applications and have a passion for using Kubernetes to make cloud-agnostic software. I'm currently a Senior Member of the Technical Staff at VMware where I'm building the next generation of certificate management within VSphere",
@AcidLeroy
AcidLeroy / forrest.vcf
Last active August 6, 2019 16:28
Vcard Source
BEGIN:VCARD
VERSION:4.0
N:Gump;Forrest;;Mr.;
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
PHOTO;MEDIATYPE=image/gif:http://www.example.com/dir_photos/my_photo.gif
TEL;TYPE=work,voice;VALUE=uri:tel:+1-111-555-1212
TEL;TYPE=home,voice;VALUE=uri:tel:+1-404-555-1212
ADR;TYPE=WORK;PREF=1;LABEL="100 Waters Edge\nBaytown\, LA 30314\nUnited States of America":;;100 Waters Edge;Baytown;LA;30314;United States of America
@AcidLeroy
AcidLeroy / index.js
Created July 19, 2019 13:41
The index code for the browser
/* eslint no-console: ["error", { allow: ["log"] }] */
/* eslint max-nested-callbacks: ["error", 5] */
'use strict'
const domReady = require('detect-dom-ready')
const createNode = require('./create-node')
const pull = require('pull-stream')
const PeerId = require('peer-id')
const PeerInfo = require('peer-info')
@AcidLeroy
AcidLeroy / bit_copy.c
Created May 18, 2019 00:17
Bit copy function
#include <stdlib.h>
#include <stdio.h>
int copy_bit(int src, int dst, int pos)
{
int shifted = (src >> pos) & 0b1;
if (shifted != 0)
{
dst |= 1UL << pos;
Verifying my Blockstack ID is secured with the address 14ww3NG4sotUQdJGttBGuuZqkgaG9f7ran https://explorer.blockstack.org/address/14ww3NG4sotUQdJGttBGuuZqkgaG9f7ran
14ww3NG4sotUQdJGttBGuuZqkgaG9f7ran https://explorer.blockstack.org/address/14ww3NG4sotUQdJGttBGuuZqkgaG9f7ran
@AcidLeroy
AcidLeroy / lens-sync-example.js
Created January 22, 2019 01:49
An incomplete example of syncing lenses
const PouchDB = require('pouchdb')
const tmp = require('tmp');
const assert = require('assert');
const R = require('ramda')
PouchDB.plugin(require('crypto-pouch'));
// Create a temporary directory
var tmpobj = tmp.dirSync();
let dbLoc = `${tmpobj.name + '/mydb'}`
console.log(`dbLoc = ${dbLoc}`)