Skip to content

Instantly share code, notes, and snippets.

Austin Klenk austinklenk

View GitHub Profile
@austinklenk
austinklenk / RoR Links
Created Nov 21, 2014
Ruby on Rails Links
View RoR Links
@austinklenk
austinklenk / Mysql Server Commands
Last active Aug 29, 2015
Access Mysql Server from Terminal
View Mysql Server Commands
#Anything surrounded in parenthesis represent a databasename / tablename
# Any Command in mysql requires a semi colon{;} after each statement
#Start Mysql
mysql.server start # <------ In Terminal, say Ruby on rails Application -->
#Access Databases
mysql -uroot # <--- In Terminal -->
#Select Database
View _form.html.erb
<%= bootstrap_form_for(@customer, inline_errors: false, label_errors: false) do |f| %>
<div class="row"> <!-- Row Start-->
<div class="col-md-10"> <!-- Col 1 Start-->
<div class="col-md-4"> <!-- First Name Start-->
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
<%= f.text_field :firstName, class: 'form-control', placeholder: "First Name", hide_label: true %>
</div>
View customer_controller.rb
class CustomersController < ApplicationController
before_action :set_customer, only: [:show, :edit, :update, :destroy]
# GET /customers
# GET /customers.json
def index
@customers = Customer.all
@campers = Camper.all
end
View design
.tc-navbar {
margin-left: 14em;
height: 55px;
width: 100%;
background-color: #ffffff;
position: fixed;
top: 0;
left: 0;
z-index: 9999;
border-bottom: 1px solid #e5e5e5;
View _form.html.erb
<%= bootstrap_form_for(@customer, inline_errors: false, label_errors: false) do |f| %>
<div class="row"> <!-- Row Start-->
<div class="col-md-10"> <!-- Col 1 Start-->
<div class="col-md-4"> <!-- First Name Start-->
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
<%= f.text_field :firstName, class: 'form-control', placeholder: "First Name", hide_label: true %>
</div>
View _form.html.erb
<%= bootstrap_form_for(@customer, inline_errors: false, label_errors: false) do |f| %>
<div class="row"> <!-- Row Start-->
<div class="col-md-10"> <!-- Col 1 Start-->
<div class="col-md-4"> <!-- First Name Start-->
<div class="input-group">
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
<%= f.text_field :firstName, class: 'form-control', placeholder: "First Name", hide_label: true %>
</div>
View server.log
2015-08-14T03:23:14.838754+00:00 app[web.1]: [2015-08-14 03:23:14] INFO WEBrick::HTTPServer#start: pid=3 port=19704
2015-08-14T03:23:15.272682+00:00 heroku[web.1]: State changed from starting to up
2015-08-14T03:33:19.250141+00:00 heroku[api]: Detach ZEROPUSH (@ref:soaring-gladly-5172) by austin@mastertechrv.com
2015-08-14T03:33:19.250174+00:00 heroku[api]: Release v10 created by austin@mastertechrv.com
2015-08-14T03:33:19.360404+00:00 heroku[web.1]: State changed from up to starting
2015-08-14T03:33:23.498586+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2015-08-14T03:33:24.502557+00:00 heroku[web.1]: Starting process with command `bin/rails server -p 26572 -e production`
2015-08-14T03:33:24.557695+00:00 app[web.1]: [2015-08-14 03:33:24] FATAL SignalException: SIGTERM
2015-08-14T03:33:24.557700+00:00 app[web.1]: /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `select'
View nav.html.erb
<div class="nav">
<% if user_signed_in? %>
<ul>
<div id="tc-menu">
<%= link_to new_customer_path, class: 'side-links' do %>
<%= image_tag("man125.png") %>
<% end %>
</div>
<div id="tc-menu">
<%= link_to new_camper_path, class: "side-links" do %>
View tooltip
.tooltip {
position: absolute !important;
z-index: 1070;
font-family: "Titillium Web", Helvetica, Arial, sans-serif;
font-size: 18px;
font-style: normal;
font-weight: normal;
text-align: center;
text-decoration: none;
text-shadow: none;
You can’t perform that action at this time.