Skip to content

Instantly share code, notes, and snippets.

View jakebloom's full-sized avatar

Jake Bloom jakebloom

View GitHub Profile
@jakebloom
jakebloom / tubbybot.py
Last active August 29, 2015 14:13
Reddit bot to follow /u/marktaylorofficial and thank him for his contribution
#!/usr/bin/python
import praw
print "Tubby bot v0.1 by Jake"
print "======================\n"
print "Initialising praw reddit object"
r = praw.Reddit(user_agent="Tubby bot by Jake")
print "Logging in as tubby-bot"
r.login("tubby-bot")
print "Getting overview from /u/marktaylorofficial"
user = r.get_redditor("marktaylorofficial")
@jakebloom
jakebloom / errors.c
Created May 14, 2015 01:25
common C errors
#include <stdio.h>
#include <stdlib.h>
#define TRUE 1
#define FALSE 0
int main (int argc, char *argv[]){
int result = function();
const jwt_simple = require('jwt-simple');
const fetch = require('node-fetch');
const qs = require('query-string');
const JWT_BEARER_URI = 'urn:ietf:params:oauth:grant-type:jwt-bearer';
const WELKIN_ENDPOINT_URL = 'https://api.welkinhealth.com/v1/token';
async function getToken() {
const tokenData = {
@jakebloom
jakebloom / askQwokka.ts
Last active October 4, 2023 08:42
Firebase function for a whatsapp bot that recommends movies and tv shows
/**
ASK QWOKKA: Your whatsapp buddy for recommending great movies and TV shows.
TRY IT NOW: https://ask.qwokka.io
*/
import * as functions from "firebase-functions";
import * as admin from "firebase-admin";
import axios from "axios";
import {