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
class ArrayView { | |
constructor(array, x, y, width, height) { | |
this.array = array; | |
this.x = x; | |
this.y = y; | |
// Automatic bounding | |
// x = 30, width of backing array = 50, width of this = 30 | |
// width = 50 - 30 = 20 | |
let max_width = array.width - x; |
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
// TypeScript bindings for react-sortable-tree | |
declare module "react-treebeard" { | |
import * as React from 'react'; | |
export interface Node { | |
id?: string; | |
name: string; | |
active?: boolean; | |
toggled?: boolean; |
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 python | |
# cloccomment.py - using cloc, return percentage of code that is comments | |
# usage: cloccomment <arguments to be passed to cloc> | |
import sys | |
import subprocess | |
args = sys.argv[1:] | |
results = subprocess.check_output(['cloc'] + args).decode('utf-8') |
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
// settings.json - VSCode settings | |
{ | |
"editor.fontSize": 12, | |
"editor.lineNumbers": "relative", | |
"workbench.colorTheme": "Zenburn", | |
"window.menuBarVisibility": "toggle", | |
"typescript.check.tscVersion": false, | |
"editor.tabSize": 2, | |
"editor.renderWhitespace": "boundary", | |
"editor.rulers": [100], |
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
Show hidden characters
{ | |
"defaultSeverity": "error", | |
"extends": [ | |
"tslint-config-airbnb" | |
], | |
"jsRules": {}, | |
"rules": { | |
"align": [false], | |
"import-name": false, | |
"variable-name": false |
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 "~bootstrap/scss/variables"; | |
@import "~bootstrap/scss/mixins"; | |
@import "~bootstrap/scss/custom"; | |
// Reset and dependencies | |
@import "~bootstrap/scss/normalize"; | |
@import "~bootstrap/scss/print"; | |
// Core CSS | |
@import "~bootstrap/scss/reboot"; |
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 | |
# circleci-try.sh -- Tries to run a new .circleci/config.yml from a checked out github repo without committing | |
# Usage: circleci-try.sh from the toplevel of a Git repo | |
# Requires $CIRCLECI_CLI_TOKEN to be set | |
# Thanks: https://discuss.circleci.com/t/running-new-config-files-without-committing/11842 | |
set -x | |
GITHUB_REPO_STR=`git config --get remote.origin.url` | |
RESULT=$? |
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 { computed, observable } from 'mobx'; | |
import { observer } from 'mobx-react'; | |
import { types } from 'mobx-state-tree'; | |
const Todo = types.model({ |
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 future reference: | |
- Check proxy is set | |
- Check that deployment branch is set if not developing on master | |
- Check that letsencrypt is set |