Skip to content

Instantly share code, notes, and snippets.

View iwaffles's full-sized avatar
🎙️
https://noob.show

Matt Gardner iwaffles

🎙️
https://noob.show
View GitHub Profile
@iwaffles
iwaffles / api_generator.js
Created March 11, 2022 20:18 — forked from v1vendi/api_generator.js
REST API functional generator
const fetch = (...args) => console.log(...args) // mock
function httpRequest(url, method, data) {
const init = { method }
switch (method) {
case 'GET':
if (data) url = `${url}?${new URLSearchParams(data)}`
break
case 'POST':
case 'PUT':
case 'PATCH':
@iwaffles
iwaffles / github-proxy-client.js
Created March 11, 2022 20:11 — forked from DavidWells/github-proxy-client.js
Full Github REST api in 34 lines of code
/* Ultra lightweight Github REST Client */
// original inspiration via https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb
const token = 'github-token-here'
const githubClient = generateAPI('https://api.github.com', {
headers: {
'User-Agent': 'xyz',
'Authorization': `bearer ${token}`
}
})
@iwaffles
iwaffles / Readme.md
Created November 5, 2021 15:31 — forked from leopoldodonnell/Readme.md
Install and run Postgres with an extension using docker-compose

Local Postgres

This gist is an example of how you can simply install and run and extended Postgres using docker-compose. It assumes that you have docker and docker-compose installed and running on your workstation.

Install

  • Requires docker and docker-compose
  • Clone via http: git clone https://gist.github.com/b0b7e06943bd389560184d948bdc2d5b.git
  • Make load-extensions.sh executable
  • Build the image: docker-compose build
@iwaffles
iwaffles / jaas-custom-domain-example.html
Created April 1, 2021 21:36
An example of using a custom domain with JaaS
<!DOCTYPE html>
<html>
<head>
<script src='https://8x8.vc/external_api.js' async></script>
<style>html, body, #jaas-container { height: 100%; }</style>
<script type="text/javascript">
window.onload = () => {
const roomName = window.location.search.replace("?room=/","");
const api = new JitsiMeetExternalAPI("8x8.vc", {
roomName: roomName,
@iwaffles
iwaffles / tmux.conf
Created September 3, 2019 02:51 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@iwaffles
iwaffles / get-subtitles.js
Created March 5, 2019 23:05 — forked from gkoberger/get-subtitles.js
Find the name Greg in Last Week Tonight episodes
var getSubtitles = require('youtube-captions-scraper').getSubtitles;
var _ = require('lodash');
// All Last Week Tonight episodes... and a few related videos that got sucked in by mistake
var videos = ["IdirC1uFdXU","baSNHz4uiX4","-mSGwndFMp8","R7qSiEKntQA","rn6QpV2Vo-0","7VG_s2PCH_c","t0CyBv18A5k","_E9DJS6I2nE","MGpo9DQkSvQ","d5SXQ_zb1XQ","R44dRIPLZGM","s6MwGeOm8iI","abn6cPxrc5w","gvZSpET11ZY","ScmJvmzDcG0","HaBQfSAVt0s","3G7aLVWzJeo","_9BjJkqybz8","4U2eDJnwz_s","IU2ye11FyIQ","WhMGcp9xIhY","CdDBi0DheMw","MdHmp5EX5bE","TB_wx0dAPU0","ximgPmJ9A5s","5HS2TstPfW4","ygVX1z6tDGI","UpdMYOtAmKY","ViDPIyiszoo","FsZ3p9gOkpY","opi8X9hQ7q8","OjPYmEZxACM","NpPyLcQ2vdI","2nXYbGmF3_Q","etkd57lPfPU","Fmh4RdIwswE","ET_b78GSBUs","dHiAls8loz4","dFnN2toxFaY","AJm8PeWkiEU","8-hahRWhFvg","OubM8bD9kck","mOVPStnVgvU","nG2pEffLEJo","hWQiXv0sn9Y","IYfgvS0FA7U","mXQuto1fMp4","5xnZ_CeTqyM","RKjk0ECXjiQ","4NNpkv3Us1I","9fB0GBwJ2QA","rs2RlZQVXBU","g6iDZspbRMg","LEcbagW4O-s","LdhQzXHYLZ4","QCjk_NPsIqU","wrpeEitIEpA","seGgZp-XYdM","1ZAPwfrt

Keybase proof

I hereby claim:

  • I am iwaffles on github.
  • I am iwaffles (https://keybase.io/iwaffles) on keybase.
  • I have a public key ASAgbOqmMH3yN8t6MW7tX00TyWAfZQ4iS0gEsW1dIT6fpwo

To claim this, I am signing this object:

@iwaffles
iwaffles / ctags.setup
Created November 7, 2016 06:43 — forked from nazgob/ctags.setup
ctags setup on mac
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
FROM ruby:2.2.2
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev
# for a JS runtime
RUN apt-get install -y nodejs
RUN mkdir /app
WORKDIR /app
ADD Gemfile /app/Gemfile
RUN bundle install
@iwaffles
iwaffles / setup_howto.txt
Created January 31, 2016 16:44 — forked from kosiara/setup_howto.txt
Setup Facebook React-native sample (empty) project on Ubuntu
# author:
# @Bartosz Kosarzycki
#
sudo apt-get install npm
sudo npm install -g react-native-cli
sudo ln -s /usr/bin/nodejs /usr/bin/node
cd /home/user/your/project/path
react-native init AwesomeProject
cd AwesomeProject