Skip to content

Instantly share code, notes, and snippets.

View arvearve's full-sized avatar

Arve Nygård arvearve

View GitHub Profile
@arvearve
arvearve / gist:4158578
Created November 28, 2012 02:01
Mathematics: What do grad students in math do all day?

Mathematics: What do grad students in math do all day?

by Yasha Berchenko-Kogan

A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.

The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.

What can you say?

digraph dependencies {
Log -> "AWS DB"
"AWS DB" -> "Migrations" -> Docker;
Log -> "Users resource access" -> Auth;
Docker -> "Measures resource access" -> "Measures manager";
"Actuator resource access" -> "Actuator Manager";
Docker -> "Customer resource access" -> "Measures manager";
"Prices resource access" -> "Consumption Engine";
"Customer resource access" -> "Consumption Engine";

Keybase proof

I hereby claim:

  • I am arvearve on github.
  • I am arvearve (https://keybase.io/arvearve) on keybase.
  • I have a public key ASDsQ4MjkI3-0dVePNADk84-kpsLK7jd-Unz1qDanHy7Swo

To claim this, I am signing this object:

@arvearve
arvearve / unix_tricks
Created July 8, 2014 14:26
Unix tricks
I have marked with a * those which I think are absolutely essential
Items for each section are sorted by oldest to newest. Come back soon for more!
BASH
* In bash, 'ctrl-r' searches your command history as you type
- Input from the commandline as if it were a file by replacing
'command < file.in' with 'command <<< "some input text"'
- '^' is a sed-like operator to replace chars from last command
'ls docs; ^docs^web^' is equal to 'ls web'. The second argument can be empty.
* '!!:n' selects the nth argument of the last command, and '!$' the last arg
@arvearve
arvearve / gist:7237537
Created October 30, 2013 18:27
Gitconfig
[user]
name =
email =
[github]
user =
token =
[alias]
co = checkout
ci = commit
st = status
@arvearve
arvearve / gist:5187999
Last active December 15, 2015 02:29
ImportError: No module named tools
######
/var/log/uwsgi/nerd.log
######
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: [Django] ERROR (EXTERNAL IP): Internal Server Error: /
From: root@localhost
To: djangoerrors@abakus.no
Date: Mon, 18 Mar 2013 14:58:03 -0000
Message-ID: <20130318145803.23500.42555@luke.abakus.no>
Traceback (most recent call last):
@arvearve
arvearve / Cornell point light
Created March 4, 2015 00:04
Simple Cornell box. No area light, just a point for now.
Composer format 2.1 ascii
camera {
position 0 0 -4
viewDirection 0 0 1
focalDistance 20
orthoUp 0 1 0
verticalFOV 0.7142857143
}
point_light {
position 0 0.7 0
ray Ray
_id size_t 1 1
startPosition Pos
x float -9.58771991 -9.58771991
y float 4.26362991 4.26362991
z float 4.60778999 4.60778999
direction Vec3f
x float 0.103407018 0.103407018
y float -0.731793463 -0.731793463
z float -0.673635959 -0.673635959

Description

This simple function will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

    function whiteboard(){
        convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1  "${@:2}"     ${1%.*}.png
    }