Skip to content

Instantly share code, notes, and snippets.

@tsherlock86
tsherlock86 / tmux.conf
Created December 10, 2017 00:09
Tmux Config
# Allow access to clipboard
# set-option -g default-command "reattach-to-user-namespace -l bash"
set -g default-terminal "screen-256color"
# unbind C-t for use within Command-T Vim plugin
unbind C-t
# change prefix to Ctrl-a (like in gnu-screen)
unbind C-a
set-option -g prefix C-b
bind-key C-b send-prefix
v\\\" Vim Config File
"New sheriff in town, Tad Sherlock's Vim stuff
if has('nvim')
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
" Hack to get C-h working in neovim
nmap <BS> <C-w>h
tnoremap <Esc> <C-\><C-w>
endif
#Since you already have your class card setup in Deck.rb we wouldn't have to require './card'
require './deck'
class Game
attr_accessor :player, :dealer, :deck
def initialize
@deck = Deck.new
@player = deck.cards.shift(2)
@tsherlock86
tsherlock86 / vimrc
Last active February 13, 2016 17:27
" Vim Config File
"
" author: Miles Z. Sterrett <miles.sterrett@gmail.com>
set nocompatible " Prevent vim from emulating vi bugs and limitations
filetype off " required for Vundle
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
#who owns the property
attr_reader :owner #grants access to @owner
# the current status of the property
# the number of house(s) or hotels on property
attr_reader :housing_status #grants access to @housing_status
#############################################################################
<div class="row" style="margin-top:20px;">
<div class="col-md-3">
<div class="cuadro_intro_hover " style="background-color:#cccccc;">
<p style="text-align:center; margin-top:20px;">
<%= image_tag(legs.image_url), class: "img-responsive" %>
</p>
<div class="caption">
<div class="blur"></div>
<div class="caption-text">
Question 1.
array.inject(:+)
Question 2.
a = [ "truck", "car", "boat]
a.where(key => "truck)
Question 3.
I don't know
Question 4.
(1..100).each do |num|
if num % 3 == 0
curl --user "tsherlock86" -X POST -d '{"title": "API-Tad Sherlock", "body": "Notes API", "assignee": "tsherlock86"}' https://api.github.com/repos/tiy-indianapolis-ror-june2015/assignments/issues
curl --user "tsherlock86" -X PATCH -d '{"state":"closed"}' https://api.github.com/repos/tiy-indianapolis-ror-june2015/assignments/issues/301
class CartsController < ApplicationController
before_action :set_cart, only: [:show, :edit, :update, :destroy]
def index
@cart = session[:cart_id]
end
# GET /carts/1
# GET /carts/1.json
def show
end
CREAT TABLE students(id, first_name, last_name);
INSERT INTO students(id, first_name, last_name) VALUES(1, "Chris", "Vannoy");
SELECT * FROM students;
SELECT COUNT(*) FROM students;
SELECT * FROM students WHERE first_name LIKE 'D%';
CREATE TABLE posts(id, title, body, summary, student_id);
INSERT INTO posts(id, title, summary, student_id) VALUES(2, "A City in Peril", null, null, 1);
SELECT * FROM students, posts WHERE students.id = posts.student_id GROUP BY students.first_name LIMIT 1;
Select COUNT(*) AS post_Count, student_id FROM posts GROUP BY student_id ORDer BY post_count desc LIMIt 1;