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 { Component } from 'react'; | |
import ReactDOM from 'react-dom'; | |
class InventoryView extends Component { | |
getTableBodyAsReactElement() { | |
let inv = [{'upc': 123}, {'upc': 454}]; | |
console.log('inv: ', inv); | |
return (!inv) ? null : ( | |
<tbody> |
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
/* value_equals.js | |
The MIT License (MIT) | |
Copyright (c) 2013-2017, Reactive Sets | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
#!/usr/bin/env bash | |
############################################# | |
# node profiler | |
# Runs the Node V8 Profiler | |
# and analyzes the output after the node app | |
# exits | |
# usage example: | |
# $ sh np.sh index.js --my-flag --my-arg 42 & | |
# $ pid=$! | |
# $ kill -s USR1 $pid |
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 click | |
import re | |
def parse_processed_log(processed_log_file): | |
"""Parse the processed log file from | |
$ node --prof-process isolate.log > proc.log | |
Prints and returns the summary | |
:param processed_log_file: <str> |
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 | |
# ====================== | |
# Check Azure CLI is installed | |
# ====================== | |
if ! [ -x "$(command -v az)" ]; then | |
echo 'Error: Azure cli is not installed.' >&2 | |
exit 1 | |
fi |
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 fs = require('fs'); | |
function toCsv(arrayOfObjects) { | |
let getProps = (object) => { | |
return Object.getOwnPropertyNames(object); | |
}; | |
let props = getProps(arrayOfObjects[0]); | |
let outputString = props.join(',') + '\n'; |
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 _ = require('lodash'); | |
const checkWords = require('check-word'); | |
const englishWords = checkWords('en'); | |
/** | |
* | |
* @param character {string} | |
* @returns {boolean} | |
*/ | |
function isUpper(character) { |
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
export $(grep -v '^#' .env | xargs) |
This file has been truncated, but you can view the full file.
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
[ | |
[ | |
2, | |
1, | |
1, | |
1, | |
6, | |
6, | |
3, | |
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
[ | |
"b", | |
"b", | |
"b", | |
"b", | |
"b", | |
"b", | |
"b", | |
"b", | |
"b", |