Skip to content

Instantly share code, notes, and snippets.

View danman01's full-sized avatar

Danny Kirschner danman01

View GitHub Profile
#!/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
#!/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 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
@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>
@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 / .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 / iterm_tmux_tmate.md
Last active January 10, 2017 14:01
iterm_tmux_tmate
class Euler
ALPHABET = ("A".."Z").to_a
VALUES = {}
def initialize
get_values
get_names
find_score
end
@danman01
danman01 / bash_prompt_customization.sh
Created March 21, 2017 01:38
bash_prompt_customization.sh
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
echo ''
elif [[ $st == "nothing to commit (working directory clean)" ]]; then
echo ''
@danman01
danman01 / rubocop_warnings.sh
Created April 4, 2017 16:55
rubocop output of ruby array methods
[email protected]: ruby-array-methods (lm01/master)* $ bin/rake
Running RuboCop...
Inspecting 25 files
..CCCCCCC.CCCCCCCCWCCCC..
Offenses:
bin/cities_array.rb:1:1: C: Missing magic comment # frozen_string_literal: true.
require_relative '../lib/cities.rb'
^