Skip to content

Instantly share code, notes, and snippets.

View danman01's full-sized avatar

Danny Kirschner danman01

View GitHub Profile
class Euler
ALPHABET = ("A".."Z").to_a
VALUES = {}
def initialize
get_values
get_names
find_score
end
@danman01
danman01 / iterm_tmux_tmate.md
Last active January 10, 2017 14:01
iterm_tmux_tmate
@danman01
danman01 / .bash_profile
Last active February 22, 2018 19:10
bash profile and vimrc
# customize prompt
#PS1="\$(~/.rvm/bin/rvm-prompt) $PS1"
# Git branch in prompt.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
parse_git_dirty() {
st=$(git status 2>/dev/null | tail -n 1)
if [[ $st == "" ]]; then
@danman01
danman01 / vim_reference.md
Last active January 10, 2017 14:38
vim reference

##vim

Vim is a text editor available on most unix systems, and can easily be installed via package managers if not already installed.

  • Great for working in the terminal.
  • Somewhat steep learning curve, but improves your speed over time.
  • Terminal-based text editor is the tool of choice for most professional coders (vim or emacs).

My reasoning for using Vim over other text editors and IDEs:

  1. You look way cooler
@danman01
danman01 / index.html
Created December 22, 2016 15:40
testing some javascript
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
#!/bin/sh
pdf_stylesheet="/Users/dkirschner/dev/mapr/apache_spark/ebook/spark-book-theme/pdf/pdf.css"
theme_stylesheet="/Users/dkirschner/dev/mapr/apache_spark/ebook/spark-ebook/theme/pdf/pdf.css"
print_stylesheet="/Users/dkirschner/dev/mapr/apache_spark/ebook/spark-book-theme/pdf/pdf_print.css"
USAGE="Usage: -f input file with either md or html file ending, -o optional output file with pdf ending, -p anything here will turn on print mode, -? or -h prints usage"
while getopts “ht:f:o:p” OPTION
do
case $OPTION in
#!/bin/sh
pdf_stylesheet="/Users/dkirschner/dev/mapr/apache_spark/ebook/spark-book-theme/pdf/pdf.css"
theme_stylesheet="/Users/dkirschner/dev/mapr/apache_spark/ebook/spark-ebook/theme/pdf/pdf.css"
print_stylesheet="/Users/dkirschner/dev/mapr/apache_spark/ebook/spark-book-theme/pdf/pdf_print.css"
USAGE="Usage: -f input file with html ending, -p anything here will turn on print mode, -? or -h prints usage"
while getopts “ht:f:p” OPTION
do
case $OPTION in
#!/bin/sh
pdf_stylesheet="/Users/dkirschner/dev/mapr/apache_spark/ebook/spark-book-theme/pdf/pdf.css"
theme_stylesheet="/Users/dkirschner/dev/mapr/apache_spark/ebook/spark-ebook/theme/pdf/pdf.css"
print_stylesheet="/Users/dkirschner/dev/mapr/apache_spark/ebook/spark-book-theme/pdf/pdf_print.css"
USAGE="Usage: -f markdown file with md file ending, -o optional output file with pdf ending, -p anything here will turn on print mode, -? or -h prints usage"
while getopts “ht:f:o:p” OPTION
do
case $OPTION in
@danman01
danman01 / git_setup.txt
Created September 1, 2014 00:30
setting up git
some nice things to do when setting up git:
# just push current branch when you do git push:
git config --global push.default current
@danman01
danman01 / postmark.txt
Created July 31, 2014 19:48
postmark inbound json response
Processing by BatchboxController#create as JSON
Parameters: {"FromName"=>"Danny K", "From"=>"[email protected]", "FromFull"=>{"Email"=>"[email protected]", "Name"=>"Danny K", "MailboxHash"=>""}, "To"=>"[email protected], \"Danny Kirschner\" <[email protected]>", "ToFull"=>[{"Email"=>"[email protected]", "Name"=>"", "MailboxHash"=>""}, {"Email"=>"[email protected]", "Name"=>"Danny Kirschner", "MailboxHash"=>""}], "Cc"=>"", "CcFull"=>nil, "Bcc"=>"", "BccFull"=>nil, "Subject"=>"test csv", "MessageID"=>"3187dfc1-5245-4ece-94b0-343126a8d177", "ReplyTo"=>"", "MailboxHash"=>"", "Date"=>"Thu, 31 Jul 2014 15:16:46 -0400", "TextBody"=>"testing csv to ngrok\r\n", "HtmlBody"=>"&lt;div dir=&quot;ltr&quot;&gt;testing csv to ngrok&lt;/div&gt;\r\n", "StrippedTextReply"=>"", "Tag"=>"", "Headers"=>[{"Name"=>"X-Spam-Checker-Version", "Value"=>"SpamAssassin 3.3.1 (2010-03-16) on sc-ord-inbound2"}, {"Name"=>"X-Spam-Status",