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
#!/bin/bash | |
# | |
# This script programs the CHIP's NAND flash using sunxi-tools' `fel` utiltiy, | |
# and U-Boot itself. The following tools must be present on the system: | |
# | |
# - dd (coreutils) | |
# - lsusb (usbutils) | |
# - fel (sunxi-tools) | |
# - mkimage (android-tools) | |
# |
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
var path = require('path') | |
module.exports = { | |
entry: './src/index.js', | |
output: { | |
path: './static', | |
publicPath: '/static/', | |
filename: 'app.js', | |
}, | |
module: { |
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
module.exports = { | |
entry: './src/index.js', | |
output: { | |
path: './pub/static', | |
publicPath: '/static/', | |
filename: 'bundle.js', | |
} | |
} |
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
// updateSearchPct :: s -> s -> s | |
export const updateSearchPct = match(ADD_FLIGHTS, | |
state => R.assoc('searchPct', | |
Math.round(state.tickets.length / state.searchTotal) * 100, state)) |
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
-module(max). | |
-export([maxThree/3, howManyEqual/3, xOr1/2, xOr2/2, xOr3/2, tests/0]). | |
maxThree(X, Y, Z) -> max(X, max(Y, Z)). | |
xOr1(X, Y) -> not (X == Y). | |
xOr2(X, Y) -> X =/= Y. | |
xOr3(X, Y) -> X == not(Y). |
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
-module(fib). | |
-export([fib/1, tests/0]). | |
fibOf(0) -> | |
0; | |
fibOf(1) -> | |
1; | |
fibOf(N) -> | |
fibOf(N-1) + fibOf(N-2). |
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
// I'm not the original author of this code. Please let me | |
// know if you know/find the original author so I can fully | |
// attribute. | |
import Vue, { VNode } from "vue"; | |
declare global { | |
namespace JSX { | |
interface Element extends VNode {} | |
interface ElementClass extends Vue {} |
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
/** | |
* (c) 2017 Hajime Yamasaki Vukelic | |
* Some rights reserved. | |
* | |
* yarn add -D webpack webpack-dev-server ts-node ts-loader html-webpack-plugin @types/webpack @types/html-webpack-plugin | |
*/ | |
import path = require("path"); | |
import HTMLWebpackPlugin = require("html-webpack-plugin"); |
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 h = (tag, attrs, ...children) => { | |
const elm = document.createElement(tag) | |
for (let key in attrs) { | |
if (key.slice(0, 2) == 'on') { | |
const evtName = key.slice(2) | |
const cb = attrs[key] | |
if (cb == null) continue // we can use null or undefnied to suppress | |
elm.addEventListener(evtName, cb) | |
} else if (['disabled', 'autocomplete', 'selected', 'checked'].indexOf(key) > -1) { | |
if (attrs[key]) { |
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
license: mit |