https://gist.github.com/loganhenson/90bb7d0c5207c4b549561ba6f30045a3 https://gist.github.com/loganhenson/5594e1a6259e830aa42479550b130e3e
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
// for use with php elm gist: https://gist.github.com/loganhenson/90bb7d0c5207c4b549561ba6f30045a3 | |
elixir.extend('elm', function(dir) { | |
var elmPath = elixir.config.assetsPath + '/elm/' + dir; | |
return new elixir.Task('elm', function() { | |
var command = 'elm make main.elm --output ../../../../' + elixir.config.publicPath + '/js/' + dir + '.js'; | |
return gulp.src('').pipe(shell('cd ' + elmPath + ';' + command)); | |
}).watch(elmPath + '/main.elm'); |
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
<?php | |
// for use with laravel elixir elm gist: https://gist.github.com/loganhenson/5594e1a6259e830aa42479550b130e3e | |
function elm($app_name, $flags = []) | |
{ | |
ob_start(); ?> | |
<div id="<?= $app_name ?>"></div> |
Why should I waste spend my time learning yet another javascript framework/language/thing?
First I want to set the tone of this post. We are taking an objective look at the javascript landscape and taking a bet on a tool.
- we want correct software
- with the least amount of time invested
- we have more than 1 person working on it
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
/*import * as React from "react"; | |
import * as ReactDOM from 'react-dom'; | |
import { Provider } from 'react-redux' | |
import { Store, createStore } from 'redux'; | |
import App from './containers/App'; | |
import reducer from './data/reducer'; | |
import { Model, initialState } from './data/model'; | |
const store: Store<Model> = createStore(reducer, initialState); |
There are many categories of apps out there that in some way/shape/form need to be able to find the simple distance between point A and point B.
A few examples might be:
- A running or biking distance tracker will probably need to find the distance between point A and point B. Then point B and point C. Then point C and point D. (This would be a "linestring", but it still comes down to the simple problem of distance on the earth).
- A restaurant delivery service might need to be able to see if you are within their maximum delivery distance.
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
console.clear(); | |
const weight = 163; // lbs | |
const height = 182; // cm | |
const age = 27; | |
// Basal metabolic rate (calories you would use just sleeping all day) | |
const bmr = Math.floor(66 + (13.7 * (0.453592 * weight)) + (5 * height) - (6.8 * age)); | |
// Total daily energy expenditure (includes a multiplier for a sedentary remote dev XD) |
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
console.clear(); | |
const weight = 163; // lbs | |
const height = 182; // cm | |
const age = 27; | |
// Basal metabolic rate (calories you would use just sleeping all day) | |
const bmr = Math.floor(66 + (13.7 * (0.453592 * weight)) + (5 * height) - (6.8 * age)); | |
// Total daily energy expenditure (includes a multiplier for a sedentary remote dev XD) |
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
import { listenAndServe } from 'https://deno.land/std/http/mod.ts' | |
import { readFileStr } from 'https://deno.land/std/fs/mod.ts' | |
import { match } from 'https://cdn.pika.dev/path-to-regexp@^6.1.0' | |
const render = async ({ page, state }) => { | |
return ` | |
<!doctype html> | |
<html lang=en> | |
<head> | |
<meta charset=utf-8> |
OlderNewer