Skip to content

Instantly share code, notes, and snippets.

View jkachmar's full-sized avatar
🏳️‍⚧️

jkachmar jkachmar

🏳️‍⚧️
View GitHub Profile
@jkachmar
jkachmar / reddit_json.rkt
Last active August 29, 2015 14:25
A little Racket script to grab titles for the top 'n' submissions in a subreddit.
#lang racket
(require net/url json)
;; Make a valid URL to retrieve a JSON payload for the top
;; entries in a given subreddit over some range of time
(define make-reddit-url
(λ (sub time limit)
(string->url
(string-append "http://www.reddit.com/r/"
sub "/top.json?"
@jkachmar
jkachmar / es5Version.js
Created June 16, 2016 15:18
Collecting Concurrent Axios Requests
const axios = require('axios');
const CAM_ARR = [
'192.0.2.189',
'192.0.2.188',
'192.0.2.187',
'192.0.2.186',
];
const SLUG = '/slug/goes/here';
@jkachmar
jkachmar / spacemacs.el
Last active July 29, 2016 19:52
Spacemacs dotfile
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
(setq-default
dotspacemacs-distribution 'spacemacs
dotspacemacs-configuration-layer-path '()
dotspacemacs-configuration-layers
'(
@jkachmar
jkachmar / exponentialSeries.hs
Last active July 13, 2016 15:08
Taylor Series Expansion of e^x
-- Power series expansion of the exponential function
-- i.e. e^x = 1 + x + (x^2)/2! + ... (x^n)/n!
-- 'Cute' version
exp :: Double -> Double
exp x = sum $ take 10 $ map go [0..]
where fac = product . flip take [1..]
go n = x ^ n / fac n
-- Explanatory version
@jkachmar
jkachmar / .vimrc
Created June 29, 2016 17:06
vim dotfiles
" -----------------------------------------------------------------------------
" Essential configuration
" -----------------------------------------------------------------------------
set nocompatible
" Space is a great leader
let mapleader = " "
set backspace=2 " backspace deletes like most programs in insert mode
set mouse=a
@jkachmar
jkachmar / package.json
Last active July 13, 2016 18:33
Mock Helium EventSource payload
{
"name": "js-language-tests",
"version": "0.0.1",
"description": "Mock EventSource data",
"private": true,
"main": "server.js",
"license": "MIT",
"dependencies": {
"eventsource": "~0.2.1",
"express": "~4.13.4",
@jkachmar
jkachmar / index.ios.js
Created July 22, 2016 20:11
React Native Tutorial
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React from 'react';
import {
AppRegistry,
Image,
@jkachmar
jkachmar / .zshenv
Created July 29, 2016 19:08
ZSH Dotfiles
# Setup NVM
export NVM_DIR=~/.nvm
source /usr/local/opt/nvm/nvm.sh
PATH=/usr/local/bin:/usr/local/sbin:/usr/local/opt/gnu-sed/libexec/gnubin:$PATH
PATH=$PATH:$HOME/.cargo/bin
PATH=$PATH:/opt/esp-open-sdk/utils:
PATH=$PATH:$HOME/.stack/programs/x86_64-osx/ghc-7.10.3/bin:$HOME/.local/bin
PATH=$PATH:$GOPATH/bin:
PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
@jkachmar
jkachmar / main.cpp
Last active August 30, 2016 18:06
mDot TTN OTAA
#include "mbed.h"
#include "mDot.h"
#include "MTSLog.h"
#include <string>
#include <vector>
#include <algorithm>
static uint8_t config_appEui[] = { <AppEUI> }; // MUST be MSB-format
static uint8_t config_appKey[] = { <AppKey> }; // MUST be MSB-format
@jkachmar
jkachmar / ttn_otaa_test.cpp
Last active September 19, 2016 14:14
TTN OTAA Test w/ Multitech mDot
#include "mbed.h"
#include "mDot.h"
#include "MTSLog.h"
#include <string>
#include <vector>
#define SLEEPTIME 5*60*1000
static uint8_t config_appEui[] = { <appEUI> };
static uint8_t config_appKey[] = { <appKey> };