View tmux.conf
source-file "${HOME}/.tmux-themepack/powerline/block/cyan.tmuxtheme" |
View Stopwatch.m.css
@import url('https://fonts.googleapis.com/css?family=Orbitron&display=swap'); | |
@import './variables.css'; | |
.root { | |
padding: 1rem; | |
text-align: center; | |
} | |
.timer { | |
font-family: 'Orbitron', sans-serif; |
View answers.ts
// Part 1 | |
/** | |
For a mass of 12, divide by 3 and round down to get 4, then subtract 2 to get 2. | |
For a mass of 14, dividing by 3 and rounding down still yields 4, so the fuel required is also 2. | |
For a mass of 1969, the fuel required is 654. | |
For a mass of 100756, the fuel required is 33583. | |
**/ | |
function fuelCounterUpper(mass: number): number { |
View .spacemacs
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
View typescript.snippets
snippet dtsx "Dojo tsx widget" | |
import { create, tsx } from '@dojo/framework/core/vdom'; | |
const factory = create(); | |
export default factory(function $1() { | |
return ( | |
<div>Widget</div> | |
); | |
}); |
View index.html
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" /> | |
<title>My First Map</title> | |
<style> | |
html, | |
body, | |
#viewDiv { |
View .vimrc
" minpac package manager | |
" Try to load minpac. | |
packadd minpac | |
if !exists('*minpac#init') | |
" minpac is not available. | |
" Settings for plugin-less environment. | |
" ... | |
else |
View Profile.ts
// src/tests/unit/widgets/Profile.ts | |
describe("Profile", () => { | |
it("default renders correctly", () => { | |
const h = harness(() => w(Profile, {})); | |
h.expect(profileAssertion); | |
}); | |
it("renders given username correctly", () => { | |
// update the expected result with a given username | |
const namedAssertion = profileAssertion.setChildren("~welcome", [ | |
"Welcome Kel Varnsen!" |
View Profile.ts
// tests/unit/widgets/Profile.ts | |
// Add the assertionTemplate module | |
import assertionTemplate from "@dojo/framework/testing/assertionTemplate"; | |
... | |
// Create my assertion | |
const profileAssertion = assertionTemplate(() => | |
v("h1", { classes: [css.root], "~key": "welcome" }, ["Welcome Stranger!"]) | |
); | |
describe("Profile", () => { | |
it("default renders correctly", () => { |
View Profile.ts
// src/widgets/Profile.ts | |
export interface ProfileProperties { | |
username?: string; | |
} | |
export default class Profile extends WidgetBase<ProfileProperties> { | |
protected render() { | |
const { username } = this.properties; | |
return v("h1", { classes: [css.root] }, [ | |
`Welcome ${username || "Stranger"}!` | |
]); |
NewerOlder