Skip to content

Instantly share code, notes, and snippets.


John Mars j0hnm4r5

View GitHub Profile
j0hnm4r5 / index.js
Created Apr 20, 2020
/r/destinythegame Sentiment Analysis
View index.js
/* eslint-disable no-restricted-syntax */
/* eslint-disable unicorn/consistent-function-scoping */
/* eslint-disable no-await-in-loop */
const axios = require(`axios`);
const language = require(`@google-cloud/language`);
const client = new language.LanguageServiceClient();
const createCsvWriter = require(`csv-writer`).createObjectCsvWriter;
View gist:45b3da0d10ae3628b3da7550b38df08b
### Keybase proof
I hereby claim:
* I am j0hnm4r5 on github.
* I am j0hnm4r5 ( on keybase.
* I have a public key ASCUT26V4jC8eOuLTXej0i86mcDj-i995bUw8tUReGNPUgo
To claim this, I am signing this object:
j0hnm4r5 / package.json
Created Mar 7, 2019
Netlify Free Password Protection
View package.json
"scripts": {
"start": "gatsby develop -p 1234 -H",
"publish": "npm run _clean && npm run _build && npm run _encrypt && npm run _envDeploy",
"//": "========= PRIVATE SCRIPTS =========",
"_clean": "gatsby clean",
"_build": "gatsby build",
"_encrypt": "npx staticrypt public/index.html P@55W0RD -o public/index.html",
"_deploy": "npx netlify-cli deploy --dir=public --prod",
j0hnm4r5 / name.c
Last active Mar 7, 2019
Teensy Serial Name
View name.c
#include <usb_names.h>
{ \
'M', '4', 'R', '5' \
#define PRODUCT_NAME \
{ \
j0hnm4r5 /
Last active Oct 7, 2018
Button Presser


  1. Set up your microcontroller according to the instructions at Johnny-Five
  2. Hook up your servo to pin 9 on the microcontroller
  3. Install all dependencies with npm install
  4. Change the numberOfPresses, pressTime, and releaseTime variables in index.js
  5. Run npm run start to begin pressing your button! You'll probably have to adjust the servo horn and whatever you're holding the servo with.
j0hnm4r5 /
Last active Jun 5, 2020
Start your PS4 from Apple Home

PS4 On Homebridge

These are instructions to create a series of buttons within the Apple Home app that control PS4 power and open/close any app you want.

  1. Install Node.js

    Begin by installing Node.js if you haven't already. Their website has up-to-date versions and installation instructions for your OS.

    For macOS I use Homebrew to install packages. If you're a developer (or an aspiring one), I highly recommend using it. Via homebrew, installing node is as simple as brew install node.

View .hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See for all currently supported options.
// ========= COLORS =========
const colors = {
black: "#08040B",
red: "#D42450",
green: "#A9D400",
yellow: "#D95702",
j0hnm4r5 / .eslintrc
Last active Aug 2, 2018
Style & Linting
View .eslintrc
"env": {
"browser": true,
"node": true
"parser": "babel-eslint",
"extends": [

Keybase proof

I hereby claim:

  • I am j0hnm4r5 on github.
  • I am j0hnm4r5 ( on keybase.
  • I have a public key ASARHghRxbYQRuv9rE8FfPv5XNLXErxuK_UoACGx7-Qlewo

To claim this, I am signing this object:

j0hnm4r5 / photonFftExample.ino
Last active Apr 21, 2020
An example for doing FFT analysis on a Particle Photon
View photonFftExample.ino
#include <math.h>
Example application for doing FFT on a Particle Photon and sending the data to Processing on a computer
Designed for Phyiscal Computing Studio, Spring 2016, IDeATe @ Carnegie Mellon University:
Inspired by Adafruit's FFT: Fun with Fourier Transforms tutorial:
FFT function from Paul Bourke:
TCP connection code provided by Alex Alspach
You can’t perform that action at this time.