Skip to content

Instantly share code, notes, and snippets.

☕️
Caffeinating

Jesse Donat donatj

☕️
Caffeinating
Block or report user

Report or block donatj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View examples.md

TypeScript

class MyLogicContainer {
    constructor(private x: number) { }
    
    add(y: number) {
        return this.x + y;
    }
}
@donatj
donatj / prblame
Created Jun 21, 2017
Find the pull request a line of a file was added with
View prblame
#!/bin/bash
set -e
blame=$(git blame "$1" -L "$2,$2" -p)
open "https://github.com/search?type=Issues&q=${blame:0:40}"
View preg_replace-bug.php
<?php
$content ='
"${folder}\\\\";
if (!isset($data[\'file\'])) { die("This doesn\'t appear to be a language constant file".nl); }
$translation = trim($value,"\' \\t\\n\\r\\0\\x0B");
\'es_ni\'=>\'Spanish (Nicaragua)\',
\'es_pa\'=>\'Spanish (Panama)\',
\'es_pe\'=>\'Spanish (Peru)\',
\'es_pr\'=>\'Spanish (Puerto Rico)\',
View UnsemanticGarbage.css
.g__font-family--Arial {
font-family: Arial;
}
.g__font-family--Tahoma {
font-family: Tahoma;
}
.g__font-family--serif {
font-family: serif;
View keybase.md

Keybase proof

I hereby claim:

  • I am donatj on github.
  • I am donatj (https://keybase.io/donatj) on keybase.
  • I have a public key whose fingerprint is 74DD CFA8 9C3E 507F E14E 2809 4864 D96E 727F 69F9

To claim this, I am signing this object:

View brew install lastpass.log
jdonat > JesseDonat-MBPrd ~/Sites/myon ±dev⚡ » brew install lastpass-cli --with-pinentry --with-doc 12:03:07
==> Installing dependencies for lastpass-cli: docbook, asciidoc, libgpg-error, libassuan, pinentry
==> Installing lastpass-cli dependency: docbook
==> Downloading https://homebrew.bintray.com/bottles/docbook-5.0.el_capitan.bottle.3.tar.gz
######################################################################## 100.0%
==> Pouring docbook-5.0.el_capitan.bottle.3.tar.gz
==> Using the sandbox
==> xmlcatalog --noout --create /usr/local/etc/xml/catalog
==> xmlcatalog --noout --del file:///usr/local/Cellar/docbook/5.0/docbook/xml/4.2/catalog.xml /usr/local/etc/xml/catalog
==> xmlcatalog --noout --add nextCatalog file:///usr/local/Cellar/docbook/5.0/docbook/xml/4.2/catalog.xml /usr/local/etc/xml/catalog
@donatj
donatj / # lastpass-cli - 2016-08-31_12-03-38.txt
Created Aug 31, 2016
lastpass-cli on Mac OS X 10.11.6 - Homebrew build logs
View # lastpass-cli - 2016-08-31_12-03-38.txt
Homebrew build logs for lastpass-cli on Mac OS X 10.11.6
Build date: 2016-08-31 12:03:38
@donatj
donatj / main.go
Created May 10, 2016
Find issues between two release branches
View main.go
package main
import (
"flag"
"fmt"
"log"
"regexp"
"sort"
"strconv"
"strings"
@donatj
donatj / ghopen.php
Created Jan 12, 2016
Open current project on Github. OS X only.
View ghopen.php
#!/usr/bin/env php
<?php
$cwd = getcwd();
$dirs = explode(DIRECTORY_SEPARATOR, $cwd);
$opened = [ ];
for( $i = count($dirs); $i >= 1; $i-- ) {
$set = array_slice($dirs, 0, $i);
$path = implode(DIRECTORY_SEPARATOR, $set);
View day7.go
package main
import (
"fmt"
"strconv"
"strings"
)
var input = `bn RSHIFT 2 -> bo
lf RSHIFT 1 -> ly
You can’t perform that action at this time.