Skip to content

Instantly share code, notes, and snippets.

View adkron's full-sized avatar

Amos King adkron

View GitHub Profile
@adkron
adkron / worker.ex
Last active March 31, 2017 03:00
API idea
defmodule Alarm.Worker do
@moduledoc false
use GenServer
# Pick ports that work on both the GrovePi+ and GrovePi Zero
@button_pin 14 # Port A0
@buzzer_pin 3 # Port D3
def start_link() do
GenServer.start_link(__MODULE__, [])
require "securerandom"
require "nokogiri"
module OpenXml
module Parts
class Rels < OpenXml::Part
include Enumerable
def self.parse(xml)
document = Nokogiri::XML(xml)
defmodule GrovePi.Buttons do
@moduledoc """
Listen for button presses or releases
Example usage:
iex> {:ok, pid} = GrovePi.start_link
{:ok, #PID<0.172.0>}
iex> GrovePi.Buttons.start_link(pid)
<!DOCTYPE html>
<html>
<head>
<title>Live Like a Hippy</title>
<meta charset="utf-8">
<style>
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
import React from 'react';
import CSSModules from 'react-css-modules';
import { Button } from 'react-toolbox/lib/button';
import Checkbox from 'react-toolbox/lib/checkbox';
import Dialog from 'react-toolbox/lib/dialog';
import Input from 'react-toolbox/lib/input';
import TOS from '../TOS';
import styles from './Signup.sass';
import React from 'react';
import CSSModules from 'react-css-modules';
import { Button } from 'react-toolbox/lib/button';
import Checkbox from 'react-toolbox/lib/checkbox';
import Dialog from 'react-toolbox/lib/dialog';
import Input from 'react-toolbox/lib/input';
import TOS from '../TOS';
import styles from './Signup.sass';
import React from 'react';
import CSSModules from 'react-css-modules';
import styles from './Payments.sass';
import { Button, Dialog, FontIcon, Link } from 'react-toolbox';
import CurrencyInput from 'react-currency-input';
const MAX_PROFIT = 1000;
class HostSignupPayments extends React.Component {
const config = require('../../config.json')
const mandrill_api_key = config[process.env.NODE_ENV].mandrill_api_key
const mandrill = require('mandrill-api/mandrill')
const mandrill_client = new mandrill.Mandrill(mandrill_api_key)
const defaultEmailProperties = {
from_email: 'hello@evmatch.co',
from_name: 'EVmatch',
to: [
{email: 'founders@evmatch.com', name: 'Founders'},
const config = require('../../config.json')
const mandrill_api_key = config[process.env.NODE_ENV].mandrill_api_key
const mandrill = require('mandrill-api/mandrill')
const mandrill_client = new mandrill.Mandrill(mandrill_api_key)
const defaultEmailProperties = {
from_email: 'hello@evmatch.co',
from_name: 'EVmatch',
to: [
{email: 'founders@evmatch.com', name: 'Founders'},
Removes unused import
Amos King @adkron <amos@binarynoggin.com>
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch request-to-charge-page
# Your branch is up-to-date with 'origin/request-to-charge-page'.
#
# Changes to be committed:
# modified: app/components/Map/MapMarker.jsx