Skip to content

Instantly share code, notes, and snippets.

View arecvlohe's full-sized avatar
🚫
End ASF Mascotry / Drop ICE

Adam Recvlohe arecvlohe

🚫
End ASF Mascotry / Drop ICE
View GitHub Profile

[Verifying my cryptographic key: openpgp4fpr:865AB70C915CEC62F7DE8B4086B2353C52B80DCB]

@arecvlohe
arecvlohe / App.re
Last active June 21, 2019 06:00
A simple example of type safe styles in reason-react-starter
module Styles = {
open Css;
let container = style([padding(px(20)), fontFamily("sans-serif")]);
let card =
style([
maxWidth(px(500)),
marginTop(px(20)),
margin2(~v=px(0), ~h=auto),
padding(px(20)),
border(px(1), solid, hex("eee")),
@arecvlohe
arecvlohe / package.json
Last active June 21, 2019 06:00
A simple package.json for reason-react-starter
{
"name": "reason-react-starter",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "concurrently \"npm run js-watch\" \"npm run bsb-watch\"",
"js-watch": "webpack-dev-server --hot --inline",
"bsb-watch": "bsb -make-world -w",
"bsb-clean": "bsb -clean-world"
@arecvlohe
arecvlohe / client.js
Last active June 21, 2019 05:59
A simple client file for reason-react-starter
import React from "react";
import ReactDOM from "react-dom";
import "normalize.css";
import { make as App } from "../lib/es6_global/src/App";
ReactDOM.render(<App />, document.querySelector("#root"));
@arecvlohe
arecvlohe / App.re
Last active June 21, 2019 05:57
A simple App component for reason-react-starter
/* Make the component */
[@react.component]
let make = () => {
<div> {"Reason React!" |> ReasonReact.string} </div>
};
@arecvlohe
arecvlohe / index.html
Created September 27, 2018 18:38
A simple index.html file for reason-react-starter
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div id="root"></div>
</body>
</html>
@arecvlohe
arecvlohe / bsconfig.json
Last active June 21, 2019 05:57
A simple bsconfig for reason-react-starter
{
"name": "reason-react-starter",
// The syntax version for reason
"refmt": 3,
// The reason jsx syntax
"reason": { "react-jsx": 3 },
// The folder to look in to find reason files
"sources": ["src"],
// How to output the files
"package-specs": [
@arecvlohe
arecvlohe / webpack.config.js
Last active June 21, 2019 05:58
A simple webpack config for reason-react-starter
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
module.exports = {
// The file that is the main point of access for the SPA
entry: path.join(__dirname, "src/client.js"),
// Where you want to output the file
output: {
// The output file's name
Verifying my Blockstack ID is secured with the address 1GmCgCPqrKKUx7JyUhJCZWHd4aeCpXxQX2 https://explorer.blockstack.org/address/1GmCgCPqrKKUx7JyUhJCZWHd4aeCpXxQX2
@arecvlohe
arecvlohe / corruptionChecksum.re
Created February 7, 2018 15:40
Advent of Code - Day 2
let getMax =
Js.Array.reduce((acc, curr) => Js.Math.max_int(acc, curr), min_int);
let getMin =
Js.Array.reduce((acc, curr) => Js.Math.min_int(acc, curr), max_int);
let corruptionChecksum = (path) =>
Node_fs.readFileSync(path, `utf8)
|> Js.String.trim
|> Js.String.split("\n")