Skip to content

Instantly share code, notes, and snippets.

View kylefritz's full-sized avatar

Kyle Fritz kylefritz

View GitHub Profile
@kylefritz
kylefritz / boom.sh
Last active August 29, 2015 14:23
BEWD Class #10 Lab
mkdir inclass-10
cd inclass-10
git init
curl https://www.gitignore.io/api/node > .gitignore
npm init
npm install --save dotenv express body-parser
git add -A
git commit -m 'initial commit'
@kylefritz
kylefritz / parse.sh
Last active August 29, 2015 14:16
parse logentires files for oink
# http://stedolan.github.io/jq/
cat Heroku-Syslog_2015-02-27_232755_2015-02-28_002755.json | jq -r '.[]|.m|tostring' | cut -c 59- > oink.log
@kylefritz
kylefritz / me_controller.rb
Last active August 29, 2015 14:14
Ruby Basics, Methods, Controller actions
class MeController < ApplicationController
def show
if session[:messages].blank?
session[:messages] = []
end
if session[:message_count].blank?
session[:message_count] = 0
end
@kylefritz
kylefritz / features.md
Last active August 29, 2015 14:11
Friendbook

First Pass

  1. make a rails app w/ postgres
  2. / - timeline (empty page)
  3. /friends - list of users in the system
  4. Use a bootswatch theme (or similar) so your app isn't boring looking
  5. User the faker gem to create a whole bunch of users
  6. Sign-in/impersonate page with a of users in system Second Pass
@kylefritz
kylefritz / todo.md
Last active August 29, 2015 14:09
Finish Betastore!

Finish Betastore!

  1. Customer facing Product List (with "Add to Cart" buttons)
  2. Controller test for Products#add_to_cart
  3. Cart Relations (many carts, each has many items)
  4. Storing cart in session. Check the Session Guidelines
  5. Modify the add_to_cart method to store the product in your cart. (Is it on the right controller?)
  6. Show a cart badge on every page to show how many items are in your cart
  7. Create a show page for your cart
  8. Total up the cost of the items in your cart (Taxes?)
@kylefritz
kylefritz / ruby-ssl-is-always-broken.rb
Created November 17, 2014 18:06
fix ruby ssl errors
# Fix SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)
#
# https://coderwall.com/p/ubl6iw/fix-ssl_connect-returned-1-errno-0-state-sslv3-read-server-certificate-b-certificate-verify-failed-openssl-ssl-sslerror
#
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
@kylefritz
kylefritz / gist:880efc5e3becc7a3bf92
Created November 15, 2014 00:41
sublime-plugins-i-use.txt
# general
AdvancedNewFile
All Autocomplete
Color Highlighter
GitGutter
Githubinator
SidebarEnhancements
# lanuages
Coffeescript
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Information</key>
<dict>
<key>Description</key>
<string>Map Rails ActiveSupport timezones to iOS readable timezone IDs.</string>
<key>Version</key>
<string>1.0</string>
@kylefritz
kylefritz / yo.rb
Created June 20, 2014 14:57
my next startup
require 'sinatra'
get '/*' do
"yo"
end
@kylefritz
kylefritz / .pathrc
Last active January 1, 2016 13:09
pathrc file
#
# PATH
#
# current directory bin (and for bundler)
PATH="./bin:./.bundle/bin"
# my local bin
PATH+=":$HOME/local/bin"