Skip to content

Instantly share code, notes, and snippets.

View naikrovek's full-sized avatar

Jeremiah Johnson naikrovek

View GitHub Profile
using Ivi.Visa.Interop;
using System;
using System.IO;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Runtime.Remoting;
using System.Runtime.Serialization;
namespace ConsoleApplication1 {
// by dw @ bees&bombs
int[][] result;
float t;
void setup() {
setup_();
result = new int[width*height][3];
}
// gif by dave whyte >:)
int[][] result;
float t;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
// Original Spark Community Thread: http://community.spark.io/t/how-to-access-the-core-via-we-browser/9711
// Code adapted from: http://arduino.cc/en/Tutorial/WebServer
/* Includes ------------------------------------------------------------------*/
#include "application.h"
SYSTEM_MODE(AUTOMATIC);
TCPServer server = TCPServer(80);
@naikrovek
naikrovek / copy_these_methods_to_your_app.c
Last active August 29, 2015 14:15
Rewrite of the important parts of the Adafruit MAX31855 library for the Spark.io platform
// these methods should be fully "functional" in that they
// work, they have no known "side effects", and that they
// will return the same outputs given the same inputs (unless
// the temperature at the thermocouple changes, of course.)
// in setup() add these lines:
// SPI.setBitOrder(MSBFIRST);
// SPI.setDataMode(SPI_MODE0);
// SPI.begin();
// then use these methods in your application.
@naikrovek
naikrovek / preprocessor_fun.h
Last active August 29, 2015 14:27 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,

Keybase proof

I hereby claim:

  • I am naikrovek on github.
  • I am naikrovek (https://keybase.io/naikrovek) on keybase.
  • I have a public key whose fingerprint is 952D F4B1 0BF8 6B7C 7062 6F98 E519 DCAF D22B 8003

To claim this, I am signing this object:

@naikrovek
naikrovek / Default (Windows).sublime-keymap
Last active September 8, 2015 18:58 — forked from jakejscott/Default (Windows).sublime-keymap
Handmade hero Sublime Text 3 settings
[
{ "keys": ["ctrl+up"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false} },
{ "keys": ["ctrl+down"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true} }
]
@naikrovek
naikrovek / circlewave.pde
Created September 7, 2014 20:45
Circle Wave
// by dave whyte
int[][] result;
float t;
void setup() {
setup_();
result = new int[width*height][3];
}
// by david @ bees & bombs
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {