Skip to content

Instantly share code, notes, and snippets.

View jaypozo's full-sized avatar

Jay Pozo jaypozo

View GitHub Profile
import type {Request, Response} from "express";
import * as functions from "firebase-functions";
import * as express from "express";
import * as admin from "firebase-admin";
import {QueryDocumentSnapshot}
from "firebase-functions/lib/providers/firestore";
import axios from "axios";
const app = express();
input: the gym
output: Fitness Buff Looking for my Swole Mate
input: technology
output: Tech Lover Looking for the Next Upgrade
input: fried chicken
output: KFC Fan on the Search for a Wingman
input: skiing
@jaypozo
jaypozo / gist:6fd5b9cbb0acb5aa9fea
Created November 17, 2015 01:03
Weechat setup
Install
-------
sudo apt-get install apt-transport-https
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 11E9DE8848F2B65222AA75B8D1820DB22A11534E
sudo bash -c "echo 'deb https://weechat.org/ubuntu trusty main' >/etc/apt/sources.list.d/weechat.list"
sudo bash -c "echo 'deb-src https://weechat.org/ubuntu trusty main' >>/etc/apt/sources.list.d/weechat.list"
sudo apt-get update
sudo apt-get install weechat-curses weechat-plugins
@jaypozo
jaypozo / gist:0ab082ed59424f02889c
Created June 17, 2015 20:17
Delete folders created over 7 days ago
#!/bin/bash
find /path/to/dir/ -maxdepth 1 -type d -ctime +7 -exec rm -rf {} \;

Keybase proof

I hereby claim:

  • I am jaypozo on github.
  • I am jaypozo (https://keybase.io/jaypozo) on keybase.
  • I have a public key whose fingerprint is F0BA A410 0144 A3C2 05C2 84A7 0D1F DA23 B800 94C9

To claim this, I am signing this object:

@jaypozo
jaypozo / gist:eaf13f7ecfec68b408cf
Created September 18, 2014 16:37
Remove BOM in golang
def trapBOM(fileBytes []byte) []byte{
trimmedBytes := bytes.Trim(fileBytes, "\xef\xbb\xbf")
return trimmedBytes
}