This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
start on runlevel [2345] | |
stop on runlevel [06] | |
exec /path/to/start.sh |
This file contains hidden or 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
propset: (o, p, v=null) -> | |
[f, r...] = p.split('.') | |
if not f of o | |
o[f] = if not r.length then v else {} | |
h.propset o[f], r.join '.', v |
This file contains hidden or 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
define = ((root) -> | |
if typeof root.define isnt 'function' or not root.define.amd | |
if GLOBAL? and typeof module is 'object' and module.exports | |
(factory) -> | |
module.exports = factory(GLOBAL.require) | |
else | |
require = (dep) -> | |
(() => | |
switch dep | |
when 'underscore' then @_ |