Skip to content

Instantly share code, notes, and snippets.

🎹
Coding a power ballad

Jake Trent jaketrent

🎹
Coding a power ballad
View GitHub Profile
@jaketrent
jaketrent / hideLikes.js
Created Apr 28, 2020
Userscript for Tampermonkey et al that hides twitter post like counts
View hideLikes.js
// ==UserScript==
// @name Hide My Twitter Like Counts
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Hide the like count
// @author jaketrent
// @include https://twitter.com/*
// @include http://twitter.com/*
// @grant none
// ==/UserScript==
@jaketrent
jaketrent / jakeConf.md
Created Jul 29, 2019
JakeConf - July 2019
View jakeConf.md
@jaketrent
jaketrent / spacemacs.md
Created Jun 19, 2018
Flow on Spacemacs
View spacemacs.md

Some quick notes:

  • install nvm
  • install node - with nvm
  • install bash - setup node/npm in bash (just zsh won't work)
  • install tern - clone; npm install - drives autocomplete
  • install flow-bin in proj - uses local flow
  • install spacemacs flow thing - https://github.com/tbinetruy/config - ties autocomplete into flow

For https://gowiththeflowtype.com/

@jaketrent
jaketrent / main.js
Created Feb 23, 2018
Simple electron main.js
View main.js
const electron = require('electron')
const app = electron.app
const BrowserWindow = electron.BrowserWindow
let mainWindow
app.on('ready', _ => {
mainWindow = new BrowserWindow({
height: 400,
@jaketrent
jaketrent / client-usage.js
Created Aug 7, 2017
glamorous glamor.css as className
View client-usage.js
<P className={glamor.css({ color: 'blue' })}>wow</P>
@jaketrent
jaketrent / Main.elm
Created Mar 20, 2017
A headless Elm program
View Main.elm
module Main exposing (..)
import MyProgram exposing (print)
import Platform exposing (program)
nodeProgram : a -> Program Never () ()
nodeProgram _ =
program
{ init = ( (), Cmd.none )
@jaketrent
jaketrent / parseDbCopyToMarkdown.js
Created Feb 19, 2017
Convert database copy data to markdown
View parseDbCopyToMarkdown.js
const fs = require('fs')
// input format:
// 25 The Innovator’s Dilemma The simultaneous need and danger to reinvent oneself and one's business is the dilemma. Do we disrupt ourselves or do we double-down on core competencies? A dilemma indeed! http://i.imgur.com/exW4j8F.jpg 2014-08-20 2014-11-28 19:05:28.153598 2014-11-28 19:05:28.153598 Craig Christensen http://www.amazon.com/gp/product/B00E257S86/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B00E257S86&linkCode=as2&tag=jaktre-20&linkId=5CDH2BHJK7TZT52R
const separateColumns = line => line.split('\t')
const nameColumns = line => ({
id: line[0],
title: line[1],
description: line[2],
coverUrl: line[3],
View flexTitleExperiment.css
.container {
display: flex;
height: 75px;
line-height: 75px;
justify-content: flex-start;
margin-bottom: 30px;
}
.container > div {
overflow: hidden;
white-space: nowrap;
@jaketrent
jaketrent / dom.js
Created Mar 7, 2016
jsdom with localStorage
View dom.js
import jsdomGlobal from 'jsdom-global'
import jsdom from 'jsdom'
import localStorage from 'localStorage'
const doc = jsdom.jsdom('<!doctype html><html><body></body></html>')
const win = doc.defaultView
win.localStorage = localStorage
global.document = doc
global.window = win
jsdomGlobal()
@jaketrent
jaketrent / dom.js
Created Mar 7, 2016
jsdom with localStorage
View dom.js
import jsdomGlobal from 'jsdom-global'
import jsdom from 'jsdom'
import localStorage from 'localStorage'
const doc = jsdom.jsdom('<!doctype html><html><body></body></html>')
const win = doc.defaultView
win.localStorage = localStorage
global.document = doc
global.window = win
jsdomGlobal()
You can’t perform that action at this time.