Skip to content

Instantly share code, notes, and snippets.

View EchoAbstract's full-sized avatar

Brian Wilson EchoAbstract

  • TrustCloud
  • Boston, MA
View GitHub Profile
@EchoAbstract
EchoAbstract / pearcy.py
Created January 8, 2017 13:38 — forked from anonymous/pearcy.py
Compute and plot Pearcey integral
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import scipy.integrate as integrate
# Dimension of image in pixels
N = 256
# Number of samples to use for integration
M = 32
@EchoAbstract
EchoAbstract / v8-versions.md
Created August 24, 2016 13:41 — forked from domenic/v8-versions.md
V8 versions for embedders

Embedders of V8 should generally use the head of the branch corresponding to the minor version of V8 that ships in Chrome.

Finding the minor version of V8 corresponding to the latest stable Chrome

To find out what version this is,

  1. Go to https://omahaproxy.appspot.com/
  2. Find the latest stable Chrome version in the table
  3. Enter it into the "Translate a Chrome verison to a V8 version" box below the table.
  4. Ignore the last two parts.
@EchoAbstract
EchoAbstract / gpgmutt.md
Created April 13, 2016 17:49 — forked from bnagy/gpgmutt.md
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@interface UIWindow (resize)
-(void)_adjustSizeClassesAndResizeWindowToFrame:(CGRect)frame;
@end
typedef enum _UICustomRes
{
UICustomResiPadTwoThirds,
UICustomResiPadHalf,
UICustomResiPadOneThird,
UICustomResiPhone47,
/**
* This stylesheet will work pretty well with a regular Org Mode HTML export.
* However, you do have to turn off all of the defaults:
*
* (setq org-export-html-style-include-scripts nil
* org-export-html-style-include-default nil)
*
* and insert a call to the stylesheet:
*
* (setq org-export-html-style
;; Connect using jabber-connect
;; My username from the HipChat configuration
;; from https://www.hipchat.com/account/xmpp
(setq jabber-account-list '(("[email protected]")))
;; To join HipChat rooms easily
(defvar hipchat-number "10804")
(defvar hipchat-nickname "Brian McKenna")
(defun hipchat-join (room)
@EchoAbstract
EchoAbstract / pictures.markdown
Created September 10, 2012 18:18 — forked from sent-hil/pictures.markdown
River (getriver.com): Keep a programming journal.

One of my favorite past times is to look at the notebooks of famous scientists. Da Vinci's notebook is well known, but there plenty others. Worshipping Da Vinci like no other, I bought a Think/Create/Record journal, used it mostly to keep jot down random thoughts and take notes. This was great in the beginning, but the conformity of lines drove me nuts. Only moleskines made blank notebooks, so I had to buy one.

At the same time I started a freelance project. The project itself is irrelevant, but suffice to say it was very complex and spanned several months. It seemed like a perfect opportunity to use the moleskine. Looking back, all my entries fell under few categories:

  • Todo
  • Question
  • Thought
  • Bug
  • Feature
@EchoAbstract
EchoAbstract / Coffeescript ctags
Created September 10, 2012 17:32 — forked from Talleyran/Coffeescript ctags
ctags definitions for Coffeescript. Very basic for now. "> ctags -e -R source_folder" and then M-. to jump to the definition of any function or variable (if you're using emacs)
--langdef=coffee
--langmap=coffee:.coffee
--regex-coffee=/^[ \t]*class ([a-zA-Z_$][0-9a-zA-Z_$]*).*$/\1/c,class/
--regex-coffee=/^[ \t]*([a-zA-Z_$@][0-9a-zA-Z_$\.]*)[ \t]*[:=].*[=-]>.*$/\1/f,function/
--regex-coffee=/^[ \t]*([a-zA-Z_$@][0-9a-zA-Z_$\.]*)[ \t]*=[^->\n]*$/\1/v,variable/
@EchoAbstract
EchoAbstract / dbManager.coffee
Created June 25, 2012 22:49 — forked from ivanstoyanov/dbManager.coffee
Node/Mongo Replica set connect string
mongo = require 'mongodb'
# full connect string
mongodbURI = "mongodb://
#{process.env.MONGO_USER}:#{process.env.MONGO_PASSWORD}@
mongoA.company.com,mongoB.company.com,mongoC.company.com/
admin?replicaSet=company&autoReconnect=true&connectTimeoutMS=500"
# obtaining a connection is now simple
mongo.connect mongodbURI, (err, db) =>