Skip to content

Instantly share code, notes, and snippets.

@alexbaldwin
alexbaldwin / keybase.md
Created July 10, 2016 20:12
Keybase verification

Keybase proof

I hereby claim:

  • I am alexbaldwin on github.
  • I am alexbaldwin (https://keybase.io/alexbaldwin) on keybase.
  • I have a public key whose fingerprint is E90E 9014 4983 DB42 5A45 A408 3090 45F2 0631 4619

To claim this, I am signing this object:

@alexbaldwin
alexbaldwin / extent.sh
Created May 17, 2016 21:32
Normalize logo images
# http://www.imagemagick.org/Usage/crop/#extent
convert envoy.png -background transparent -gravity center -extent 400x200 envoy.png
* Save maps offline by searching for 'ok maps' in Google Maps
* Wool clothing, wash every five days
* Mophie charger
* T-mobile unlimited 2G data roaming
* Global entry
@alexbaldwin
alexbaldwin / zshrc.local
Last active January 15, 2016 20:48
Whiteboard cleaning command
# converts an image to png, extracts strokes, traces etc.
whiteboard() {
convert "$1" "$1.converted.png"
echo "Converted"
convert "$1.converted.png" \
-morphology Convolve DoG:15,100,0 \
-negate -normalize -blur 0x1 -channel RBG \
-level 60%,91%,0.1 \
"$1.cleaned.png"
echo "Cleaned"
@alexbaldwin
alexbaldwin / emoji-extractor.rb
Created January 10, 2016 01:49
Twitter Emoji Extractor
require 'twemoji'
require 'active_support/core_ext/string/inflections'
sentence = "I like chocolate"
words = sentence.downcase.split(/\W+/)
words.delete_if { |w| w.size <= 2 }
emojis = ""
words.each do |word|
@alexbaldwin
alexbaldwin / default-badge.css
Created December 19, 2015 02:53
Envoy's default badge CSS
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
html {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
@alexbaldwin
alexbaldwin / resize-text.css
Created December 18, 2015 21:06
Make the visitor information text larger or smaller
body {
width: 1050px;
height: 100%;
margin: 0 auto;
padding: 0;
font-family: Avenir, Helvetica Neue, Arial, sans-serif;
font-size: 40px;
line-height: 1.4;
position: relative;
}
@alexbaldwin
alexbaldwin / visitor-information.css
Created December 18, 2015 21:05
Move visitor information down
/* Visitor Information
-----------------------------------*/
.content {
position: absolute;
top: 50%;
-webkit-transform: translateY(-40%);
transform: translateY(-40%);
width: 100%;
}
@alexbaldwin
alexbaldwin / visitor-name-size.css
Created December 18, 2015 21:00
Change the size of the Visitor Name
.name {
font-size: 74px;
font-weight: 300;
word-wrap: break-word;
line-height: 1.1;
margin-bottom: 30px;
}
.name:first-line {
font-size: 100px;
@alexbaldwin
alexbaldwin / hard-corners.css
Created December 18, 2015 20:42
Square with hard corners
.photo img {
width: 230px;
border-radius: 0%;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
}