Skip to content

Instantly share code, notes, and snippets.

View jtmkrueger's full-sized avatar
🎉
Working from home

John Krueger jtmkrueger

🎉
Working from home
View GitHub Profile
'use strict';
var LIVERELOAD_PORT = 35729;
var SERVER_PORT = 9000;
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT});
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
// # Globbing
// for performance reasons we're only matching one level down:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Mocha Spec Runner</title>
<link rel="stylesheet" href="bower_components/mocha/mocha.css">
</head>
<body>
<div id="mocha"></div>
@jtmkrueger
jtmkrueger / README.md
Last active August 29, 2015 14:06 — forked from agnoster/README.md

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@jtmkrueger
jtmkrueger / bairep
Created September 17, 2014 17:47
broken attachments in rails_email_preview
Started GET "/FleetDASH/emails/campaign_mailer_preview-p_positive/attachments/training_button.png" for 127.0.0.1 at 2014-09-17 11:44:40 -0600
Processing by RailsEmailPreview::EmailsController#show_attachment as PNG
Parameters: {"email_locale"=>:en, "preview_id"=>"campaign_mailer_preview-p_positive", "filename"=>"graph_1"}
Processing by RailsEmailPreview::EmailsController#show_attachment as PNG
Parameters: {"email_locale"=>:en, "preview_id"=>"campaign_mailer_preview-p_positive", "filename"=>"graph_2"}
Processing by RailsEmailPreview::EmailsController#show_attachment as PNG
Parameters: {"email_locale"=>:en, "preview_id"=>"campaign_mailer_preview-p_positive", "filename"=>"header"}
(1.0ms) SET search_path TO fleetdash,public
Completed 404 Not Found in 32ms
Completed 404 Not Found in 43ms
# controller
def show
render :xlsx => 'show', :filename => 'simple.xlsx'
end
#show.xlsx.axlsx
Axlsx::Package.new do |p|
p.workbook.add_worksheet(:name => "Test") do |sheet|
# sheet.add_row [@final_report.id, @final_report.reporting_date, @final_report.created_at]
GREP_COLOR=1;32
MANPATH=/opt/macports/share/man:/opt/macports/man:/opt/git/share/man:
COLOR_NC=e[0m
rvm_scripts_path=/Users/john_t_krueger/.rvm/scripts
rvm_bin_path=/Users/john_t_krueger/.rvm/bin
TERM_PROGRAM=Apple_Terminal
COLOR_RED=e[0;31m
COLOR_CYAN=e[0;36m
COLOR_PURPLE=e[0;35m
TERM=xterm-color
$ gem uninstall mysql; gem install mysql
ERROR: While executing gem ... (Gem::InstallError)
cannot uninstall, check `gem list -d mysql`
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/Users/john_t_krueger/.rvm/rubies/ruby-1.8.6-p114/bin/ruby extconf.rb
checking for mysql_ssl_set()... yes
checking for rb_str_set_len()... no
[2010-05-06 09:44:45] make
dln.c: In function ‘dln_load’:
dln.c:1463: warning: ‘NSCreateObjectFileImageFromFile’ is deprecated (declared at /usr/include/mach-o/dyld.h:145)
dln.c:1469: warning: ‘NSLinkModule’ is deprecated (declared at /usr/include/mach-o/dyld.h:161)
dln.c:1472: warning: ‘NSIsSymbolNameDefined’ is deprecated (declared at /usr/include/mach-o/dyld.h:176)
dln.c:1475: warning: ‘NSAddressOfSymbol’ is deprecated (declared at /usr/include/mach-o/dyld.h:188)
dln.c:1475: warning: ‘NSLookupAndBindSymbol’ is deprecated (declared at /usr/include/mach-o/dyld.h:179)
file.c: In function ‘lchmod_internal’:
file.c:1784: warning: cast from pointer to integer of different size
process.c: In function ‘detach_process_watcher’:
##
# Your previous /Users/john_t_krueger/.profile file was backed up as /Users/john_t_krueger/.profile.macports-saved_2010-02-25_at_10:01:22
##
# MacPorts Installer addition on 2010-02-25_at_10:01:22: adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
for a in local $(ls /opt/ | grep -v local | grep -v gentoo); do
FULLPATH=/opt/$a
@jtmkrueger
jtmkrueger / promptcolor
Created September 13, 2011 16:34
color your prompt and show git branch
#color and git branch
parse_git_branch() {··
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export CLICOLOR=1
export GREP_OPTIONS="--color"
export LSCOLORS=gxfxcxdxbxegedabagacad
PS1='\n\[\e[1;36m\]\w \[\e[m\]\[\e[1;33m\]$(parse_git_branch)\[\e[m\] \n> '