Skip to content

Instantly share code, notes, and snippets.

View jakedsouza's full-sized avatar

Jake Dsouza jakedsouza

View GitHub Profile

Description

This simple script 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:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@jakedsouza
jakedsouza / testHook.js
Created September 3, 2015 01:21
My first hook.io microservice
// A simple hello world microservice
// Click "Deploy Service" to deploy this code
// Service will respond to HTTP requests with a string
module['exports'] = function helloWorld (hook) {
// hook.req is a Node.js http.IncomingMessage
var host = hook.req.host;
// hook.res is a Node.js httpServer.ServerResponse
// Respond to the request with a simple string
hook.res.end(host + ' says, "Hello world!"');
};

Keybase proof

I hereby claim:

  • I am jakedsouza on github.
  • I am jakedsouza (https://keybase.io/jakedsouza) on keybase.
  • I have a public key whose fingerprint is C808 DBF3 A070 8DAB 9603 A4E1 C24D 9498 A771 F7A6

To claim this, I am signing this object:

@jakedsouza
jakedsouza / bumpversion.sh
Created October 5, 2016 06:03 — forked from pete-otaqui/bumpversion.sh
Bump a software project's VERSION, add the CHANGES, and tag with GIT
#!/bin/bash
# works with a file called VERSION in the current directory,
# the contents of which should be a semantic version number
# such as "1.2.3"
# this script will display the current version, automatically
# suggest a "minor" version update, and ask for input to use
# the suggestion, or a newly entered value.
@jakedsouza
jakedsouza / main.go
Created October 23, 2016 09:11 — forked from mschoebel/main.go
Snippet: login/logout (Golang)
package main
import (
"fmt"
"github.com/gorilla/mux"
"github.com/gorilla/securecookie"
"net/http"
)
// cookie handling
### gen certs
# Create your CA crt and key:
openssl req -new -x509 -nodes -newkey rsa:4096 \
-extensions v3_ca -sha256 -days 3650 \
-subj "/C=US/ST=CA/L=Palo Alto/O=Jakes Inc./CN=Jake Certificate Authority" \
-keyout ca.key \
-out ca.crt
chmod 600 ca.key
@jakedsouza
jakedsouza / Prometheus.md
Created February 16, 2018 02:18
Prometheus notes
@jakedsouza
jakedsouza / ubuntu.sh
Created February 17, 2018 00:44
Minimal ubuntu setup
#!/bin/bash
require_root() {
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
}
update_apt() {
@jakedsouza
jakedsouza / README.md
Created May 17, 2018 21:17 — forked from subfuzion/README.md
vim/neovim configuration

I recently switched over to neovim (see my screenshots at the bottom). Below is my updated config file.

It's currently synchronized with my .vimrc config except for a block of neovim-specific terminal key mappings.

This is still a work in progress (everyone's own config is always a labor of love), but I'm already extremely pleased with how well this is working for me with neovim. While terminal mode isn't enough to make me stop using tmux, it is quite good and I like having it since it simplifies my documentation workflow for yanking terminal output to paste in a markdown buffer.

These days I primarily develop in Go. I'm super thrilled and grateful for fatih/vim-go,

### Keybase proof
I hereby claim:
* I am jakedsouza on github.
* I am jakedsouza (https://keybase.io/jakedsouza) on keybase.
* I have a public key whose fingerprint is 3886 5AF8 36A8 6800 B680 AF7C AB02 9F80 4173 1D39
To claim this, I am signing this object: