Skip to content

Instantly share code, notes, and snippets.

📺

John Mars j0hnm4r5

📺
Block or report user

Report or block j0hnm4r5

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@j0hnm4r5
j0hnm4r5 / etchASketch_forPlotter.py
Created Apr 30, 2014
Working etch-a-sketch for the plotter, controlled by BrainJr.
View etchASketch_forPlotter.py
import pygame
from pygame.locals import *
from pygame import midi
from colors import *
import chiplotle
import sys
import time
import random
@j0hnm4r5
j0hnm4r5 / photonOscExample.ino
Created Jan 21, 2016
An example for sending and receiving OSC messages with a Particle Photon
View photonOscExample.ino
#include "simple-OSC/simple-OSC.h"
// create OSC object
UDP osc;
// set IP addresses and ports for I/O
IPAddress outIp(128, 237, 246, 8);
unsigned int outPort = 9000;
unsigned int inPort = 3000;
View keybase.md

Keybase proof

I hereby claim:

  • I am j0hnm4r5 on github.
  • I am j0hnm4r5 (https://keybase.io/j0hnm4r5) on keybase.
  • I have a public key ASARHghRxbYQRuv9rE8FfPv5XNLXErxuK_UoACGx7-Qlewo

To claim this, I am signing this object:

@j0hnm4r5
j0hnm4r5 / photonFftExample.ino
Last active Apr 7, 2018
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: http://courses.ideate.cmu.edu/physcomp/s16/48-390/
Inspired by Adafruit's FFT: Fun with Fourier Transforms tutorial: https://learn.adafruit.com/fft-fun-with-fourier-transforms/software
FFT function from Paul Bourke: http://paulbourke.net/miscellaneous/dft/
TCP connection code provided by Alex Alspach
@j0hnm4r5
j0hnm4r5 / .eslintrc
Last active Aug 2, 2018
Style & Linting
View .eslintrc
{
"env": {
"browser": true,
"node": true
},
"parser": "babel-eslint",
"extends": [
"airbnb",
"plugin:promise/recommended",
"plugin:unicorn/recommended",
View rhino_to_hpgl.py
'''This script creates an HPGL file from curves in a Rhino file.
Place all curves in the model world as they would sit in relation to the origin on the plotter.
File will export to same location as script.'''
import rhinoscriptsyntax as rs
from datetime import datetime
import os.path
filename = rs.GetString("What would you like to name the file? (Use \"#\" for ISO 8601) ", defaultString="output#")
@j0hnm4r5
j0hnm4r5 / README.md
Last active Oct 7, 2018
Button Presser
View README.md

Installation

  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
j0hnm4r5 / name.c
Last active Mar 7, 2019
Teensy Serial Name
View name.c
#include <usb_names.h>
#define MANUFACTURER_NAME \
{ \
'M', '4', 'R', '5' \
}
#define MANUFACTURER_NAME_LEN 4
#define PRODUCT_NAME \
{ \
@j0hnm4r5
j0hnm4r5 / package.json
Created Mar 7, 2019
Netlify Free Password Protection
View package.json
{
...,
"scripts": {
"start": "gatsby develop -p 1234 -H 0.0.0.0",
"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",
View .hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
// ========= COLORS =========
const colors = {
black: "#08040B",
red: "#D42450",
green: "#A9D400",
yellow: "#D95702",
You can’t perform that action at this time.