As configured in my dotfiles.
start new:
tmux
start new with session name:
#/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
'use strict'; | |
const gulp = require('gulp'); | |
gulp.task('clean', clean); | |
gulp.task('build', build); | |
gulp.task('default', gulp.series(clean, build, watch)); | |
function clean() { | |
const del = require('del'); |
const os = require("os"); | |
const fs = require("fs"); | |
const Emitter = require('events'); | |
var wslNetworkInterfaces = function() { | |
console.log("WSL has no idea what interfaces are available."); | |
return { | |
"Loopback Pseudo-Interface 1": [ | |
{ | |
"address": "::1", |
As configured in my dotfiles.
start new:
tmux
start new with session name:
. |
type Validator<T> = (value: any) => value is T; | |
const is = { | |
boolean(value: any): value is boolean { | |
return typeof value === 'boolean'; | |
}, | |
string(value: any): value is string { | |
return typeof value === 'string'; | |
}, | |
number(value: any): value is number { |
type Animal = string & { __isAnimal__: any }; | |
type Cat = Animal & { __isCat__: any }; | |
type Dog = Animal & { __isDog__: any }; | |
type SmallDog = Dog & { __isSmallDog__: any }; | |
function getCatName(): Cat { | |
return 'Garfield' as Cat; | |
} |
var combineFiles = require('./combine-files-callback'); | |
var fs = require('fs'); | |
var http = require('http'); | |
// Warning: Error handling omitted for simplicity | |
var server = http.createServer(function (req, res) { | |
var files = [ | |
'./files/1.txt', | |
'./files/2.txt', | |
'./files/3.txt' |
{ | |
"version": "0.1.0", | |
"command": "mocha", | |
"isShellCommand": true, | |
"showOutput": "silent", | |
"args": [ | |
"--reporter", | |
"tap", | |
"--colors" | |
], |
import {Component, EventEmitter, Type} from '@angular/core'; | |
type MetadataName = 'Input' | 'Output'; | |
interface PropDecoratorFactory { | |
ngMetadataName: MetadataName; | |
bindingPropertyName: string | undefined; | |
} | |
interface PropMetadata { [key: string]: PropDecoratorFactory[]; } |