Skip to content

Instantly share code, notes, and snippets.

View markjlorenz's full-sized avatar

Mark Lorenz markjlorenz

View GitHub Profile
@markjlorenz
markjlorenz / mutt_notes.markdown
Last active July 25, 2021 18:16
Notes on getting Mutt running on OSX
  • brew install mutt
  • setup an app password for mutt in gmail
  • setup an app password for imap_notifier in gmail
  • brew install terminal-notifier terminal-notifier
  • gem install imap_notifier imap_notifier
  • brew install urlview
  • brew install w3m (links would be OK too)
  • Install pandoc to author in markdown and send as HTML

~/.muttrc

@markjlorenz
markjlorenz / Symbols.txt
Created February 3, 2014 00:56
ASCII Symbols
[ " ] quotation mark [name: "] [number: "]
[ & ] ampersand [name: &] [number: &]
[ < ] less than [name: &lt;] [number: &#60;]
[ > ] greater than [name: &gt;] [number: &#62;]
[ ] non-breaking space [name: &nbsp;] [number: &#160;]
[ ¡ ] inverted exclamation mark [name: &iexcl;] [number: &#161;]
[ ¢ ] cent [name: &cent; ] [number: &#162;]
[ £ ] pound [name: &pound;] [number: &#163;]
[ ¤ ] currency [name: &curren;] [number: &#164;]
[ ¥ ] yen [name: &yen;] [number: &#165;]
@markjlorenz
markjlorenz / talk_ideas.markdown
Last active January 3, 2016 17:39
Talk Ideas

Talk Ideas:

CRB 17-Feb-2014

When not to ruby

repo

A talk about when you might choose a langauge other than ruby.

Horse e-books-motron

@markjlorenz
markjlorenz / kegmotron_LnL_outline.markdown
Last active January 3, 2016 07:38
Kegmotron Lunch and Learn Outline

Kegmotron Lunch and Learn

What's a keg motron?

  • A wireless scale that the keg sits on.
  • Measures the weight of the beer.
  • Not overly accurate.

Demo

  • devmotron is there beer?
  • charts
@markjlorenz
markjlorenz / fitting.gplot
Last active January 2, 2016 23:49
gnuplot examples
#!/usr/bin/env gnuplot
set datafile separator ","
file="`echo $plot_file`" # make sure to set the $plot_file environment varible first
f(x) = m * x**b # fit to trend matching mx^b
m = 5 # start the 'm' search at 5
b = 2 # start the 'b' search at 2
fit f(x) file via m,b
CMRotationMatrix rotationMatrixFromGravity(float x, float y, float z)
{
// The Z axis of our rotated frame is opposite gravity
vec3f_t zAxis = vec3f_normalize(vec3f_init(-x, -y, -z));
// The Y axis of our rotated frame is an arbitrary vector perpendicular to gravity
// Note that this convention will have problems as zAxis.x approaches +/-1 since the magnitude of
// [0, zAxis.z, -zAxis.y] will approach 0
vec3f_t yAxis = vec3f_normalize(vec3f_init(0, zAxis.z, -zAxis.y));
@markjlorenz
markjlorenz / .screenrc
Created October 6, 2013 15:43
screenrc
bind c stuff "screen -X chdir \$PWD; screen^M"
defscrollback 90000 # Use a 30000-line scrollback buffer
escape ^@a # Instead of Control-a, make the escape/command character be Control-space
term screen-256color
@markjlorenz
markjlorenz / .vimrc
Created October 5, 2013 15:34
a vimrc
colorscheme vividchalk
set nocompatible
set nobackup
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
set indentexpr=
set number
set autoindent

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

#!/usr/bin/env ruby
#/ Usage: <progname> [options]...
#/ How does this script make my life easier?
# ** Tip: use #/ lines to define the --help usage message.
$stderr.sync = true
require 'optparse'
# default options
flag = false
option = "default value"