Skip to content

Instantly share code, notes, and snippets.

View matthewr6's full-sized avatar
🛠️
Building things

Matthew matthewr6

🛠️
Building things
View GitHub Profile
@matthewr6
matthewr6 / markov.js
Created February 4, 2017 21:45
markov chain data generator I made a while ago
const fs = require('fs');
// data: output of learnFromTopic or learnFromSubforum
// initial: initial word
function simulate(data, initial) {
let terminate = false;
let generatedWords = [initial];
if (!data[initial]) return;
while (!terminate) {
const prevWord = generatedWords[generatedWords.length - 1];
@matthewr6
matthewr6 / autopull.go
Created July 5, 2016 01:55
automatically pull from master for all directories at the same level
package main
import (
"os"
"fmt"
"os/exec"
"io/ioutil"
)
func main() {
@matthewr6
matthewr6 / references.go
Created May 21, 2016 22:10
Scratch user referencing
package main
import (
"os"
"fmt"
"bufio"
"regexp"
"strings"
"net/http"
"encoding/json"
@matthewr6
matthewr6 / hosting.md
Last active August 29, 2015 14:26
Simple local hosting

Setup

  • Python on system path (or a way to set up localhost)
  • Knowledge of how to use system path variable
  • Basic CLI knowledge

Downloads

  • Get ngrok
  • Add ngrok to your system path (or bin folder on *NIX)

Do things