Skip to content

Instantly share code, notes, and snippets.

@blakef
blakef / jumpjira.sh
Created September 26, 2018 09:20
Open to a jira ticket looking at: argument, clipboard or current repository
#!/bin/bash
URL=https://<megacorp>.atlassian.net/browse/
TICKET_PREFIX=FOO
function validTicket() {
FOUND=`echo "$1" | sed 's/.*\($TICKET_PREFIX-[0-9]\+\).*/\1/Ig' | tr [:lower:] [:upper:]`
if [[ "$FOUND" == WYN* ]]; then
open "$URL$FOUND"
exit 0
fi
// Monitors a path for file changes and reports them to Slack
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"os"
"time"
@blakef
blakef / loot.py
Created December 28, 2016 21:56
Notifies when loot arrives
#!/usr/bin/env python
from argparse import ArgumentParser
import os
import time
from slackclient import SlackClient
def modified(cache, current):
modified = []
@blakef
blakef / tsc.log
Created November 2, 2016 10:16
tsc --moduleResolution
This file has been truncated, but you can view the full file.
======== Resolving module 'http' from '/Users/bf/dev/bandicoot/scheduler/src/index.ts'. ========
Module resolution kind is not specified, using 'NodeJs'.
Loading module 'http' from 'node_modules' folder.
File '/Users/bf/dev/bandicoot/scheduler/src/node_modules/http.ts' does not exist.
File '/Users/bf/dev/bandicoot/scheduler/src/node_modules/http.tsx' does not exist.
File '/Users/bf/dev/bandicoot/scheduler/src/node_modules/http.d.ts' does not exist.
File '/Users/bf/dev/bandicoot/scheduler/src/node_modules/http/package.json' does not exist.
File '/Users/bf/dev/bandicoot/scheduler/src/node_modules/http/index.ts' does not exist.
File '/Users/bf/dev/bandicoot/scheduler/src/node_modules/http/index.tsx' does not exist.
File '/Users/bf/dev/bandicoot/scheduler/src/node_modules/http/index.d.ts' does not exist.

Keybase proof

I hereby claim:

  • I am blakef on github.
  • I am blakef (https://keybase.io/blakef) on keybase.
  • I have a public key ASB5Udgevie50fJJSK68eCeX-UDVSqxF7tGRVDW-Q7Nszwo

To claim this, I am signing this object:

@blakef
blakef / isowebpack.md
Last active March 13, 2017 20:26
Isomorphic Webpack Applications

Isomorphic Webpack Applications

Applications that can run on the client and server side, which for our purposes this means in both the Node and browser environment.

So, how do we do this and how do we use webpack?

Dependencies

Lets install some dependencies:

$ npm i webpack@beta babel-loader babel-preset-es2015 -D
@blakef
blakef / webpack.config.js
Created May 21, 2016 16:48
Webpack configuration trubs.
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const path = require('path');
module.exports = {
context: __dirname,
entry: {
'app': [
'./src/javascript/site.js',
]
@blakef
blakef / hello.ts
Last active October 29, 2015 01:47
TypeScript + RxJS
import path = require('path');
import Git = require('nodegit');
import Rx = require('rx');
class Repo {
private repo: Rx.Observable<Git.Repository>;
constructor(private pathname: string) {
this.repo = Rx.Observable.fromPromise(Git.Repository.open(pathname));
}
@blakef
blakef / index.html
Last active August 29, 2015 14:28
zGVmyY
div(ng-app="app", ng-controller="ctrl")
p {{ a }}
p(ng-controller="nested") {{ b }}
@blakef
blakef / VLJxxO.markdown
Last active August 29, 2015 14:27
VLJxxO