Skip to content

Instantly share code, notes, and snippets.

View joshuacronemeyer's full-sized avatar
🕶️
Plotting

Josh joshuacronemeyer

🕶️
Plotting
  • TruCentive
  • Berkeley
View GitHub Profile
@joshuacronemeyer
joshuacronemeyer / test html email
Created May 29, 2015 21:37
test html email for PM with notes
<table cellpadding="0" cellspacing="0" width="600" border="0"
class="mail_row" align="center" bgcolor="#FFFFFF">
<tbody class="">
<tr class="">
<td align="left" valign="top" class="mail_col" width=
"600" style=
"border-collapse: collapse; max-width: 600px; min-width: 600px;">
<table cellpadding="0" cellspacing="0" border="0"
@joshuacronemeyer
joshuacronemeyer / email.html
Created April 2, 2015 21:02
pink martini html email
<table
celpadding="0" cellspacing="0" align="center" width="650"
border="0" id="main_table" bgcolor="#F1F1F3" style="margin: 0px;
padding: 0px; background-color: rgb(241, 241, 243); width: 100%
!important; line-height: 100% !important; font-family: Helvetica;
letter-spacing: normal; orphans: auto; text-indent: 0px; text-transform:
none; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"
class=""><tbody class=""><tr class=""><td align="center"
style="border-collapse: collapse;" class=""><table width="650"
cellpadding="0" cellspacing="0" border="0" class=""><tbody
@joshuacronemeyer
joshuacronemeyer / widget.css
Created March 4, 2015 23:36
responsive widget
/******* START APPLAUZE WIDGET *********/
.az-widget-container{
color: #ccc;
width: 968px;
margin: 0 auto;
margin-top: 55px;
margin-bottom: 55px;
font-size: 14px;
}
.az-widget-custom-td{
@joshuacronemeyer
joshuacronemeyer / laredo_example.html
Last active August 29, 2015 14:13
streets of laredo widget styling
<html>
<head>
...
<style>
.applauze-tour table.az-widget-custom-table{
color: white;
}
.applauze-tour table.az-widget-custom-table th, .applauze-tour table.az-widget-custom-table td{
border-color: white;
@joshuacronemeyer
joshuacronemeyer / BoxOfficeListController.rb
Last active August 29, 2015 14:10
Pseudocode imagining how i might model the problem of creating CSV for creating willcall lists
class BoxOfficeListController < ApplicationController
def show
@box_office_lists = BoxOfficeLists.new(params[:occurrence_id])
end
end
@joshuacronemeyer
joshuacronemeyer / memory_log_parser.rb
Created June 4, 2014 22:56
AZ memory error log munging
File.open("./may_18", "r") do |f|
f.each_line do |line|
if line.match(/web.1 .*Process running/)
memory = line.match(/mem=(\d{4})M/)[1]
time = line.match(/(2014-05.*) d/)[1]
puts "#{time}, #{memory}"
end
end
end
@joshuacronemeyer
joshuacronemeyer / file-nohup-out
Created May 28, 2014 22:48
binstub issue 15 debugging output
=============================================================================================================
+ ruby_v=2.1.2
+ rspec_v=2.14.8
+ rspec_core_v=2.14.7
+ cd /Users/josh/tmp
binstub_script: line 11: cd: /Users/josh/tmp: No such file or directory
+ :
+ rm -rf /Users/josh/.rbenv/versions/2.1.2
+ RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl/1.0.1g
+ rbenv install 2.1.2
@joshuacronemeyer
joshuacronemeyer / workaround.diff
Created May 8, 2014 17:10
Workaround for .yadr skwp pretzo prompt theme and rbenv with the gemfile plugin.
@@ -1 +1 @@
-Subproject commit a4bacb8bb9293d55db3afe1542e97ec7d964011a
+Subproject commit 16aa48baeb92866a1921ce2199f2cba1099ce22c
diff --git i/zsh/prezto-themes/prompt_skwp_setup w/zsh/prezto-themes/prompt_skwp_setup
index c45eb8a..0ed6b0f 100644
--- i/zsh/prezto-themes/prompt_skwp_setup
+++ w/zsh/prezto-themes/prompt_skwp_setup
@@ -23,9 +23,13 @@ function prompt_skwp_precmd {
fi
@joshuacronemeyer
joshuacronemeyer / geocodeable.rb
Created April 9, 2014 16:29
Add geocoder methods to a poro
# This code creates an object that is sortable
# by it's distance to a particular event
# the event and friend code isn't included
# but both objects have latitude and longitude accessors
# you need the geocoder gem in your gemfile.
class FriendEvent
require 'geocoder/stores/base'
include Comparable
include Geocoder::Store::Base
@joshuacronemeyer
joshuacronemeyer / base.css.scss
Created January 16, 2014 21:25
Add your own sass helpers if you're using the sass-rails gems
html {
background: background_url_from_config() no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}