This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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?" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- 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 | |
'( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ----------------------------------------------------------------------------- | |
" 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sample React Native App | |
* https://github.com/facebook/react-native | |
* @flow | |
*/ | |
import React from 'react'; | |
import { | |
AppRegistry, | |
Image, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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> }; |
OlderNewer