Skip to content

Instantly share code, notes, and snippets.

View alexpchin's full-sized avatar

Alex Chin alexpchin

View GitHub Profile
@alexpchin
alexpchin / progression_of_html.md
Created March 21, 2015 18:35
Progression of HTML
Type of content HTML 1.2 HTML 4.01 HTML5 Purpose
Heading Yes Yes Yes Organize page content by adding headings and subheadings to the top of each section of the page
Paragraph Yes Yes Yes Identify paragraphs of text
Address Yes Yes Yes Identify a block of text that contains contact information
Anchor Yes Yes Yes Link to other web content
List Yes Yes Yes Organize items into a list
Image Yes Yes Yes Embed a photograph or drawing into a web page
Table No Yes Yes Organize data into rows and columns
Style No Yes Yes Add CSS to control how objects on a web page are presented
@alexpchin
alexpchin / progresson_of_html.md
Created March 25, 2015 10:47
Progression of HTML
Type of content HTML 1.2 HTML 4.01 HTML5 Purpose
Heading Yes Yes Yes Organize page content by adding headings and subheadings to the top of each section of the page
Paragraph Yes Yes Yes Identify paragraphs of text
Address Yes Yes Yes Identify a block of text that contains contact information
Anchor Yes Yes Yes Link to other web content
List Yes Yes Yes Organize items into a list
Image Yes Yes Yes Embed a photograph or drawing into a web page
Table No Yes Yes Organize data into rows and columns
Style No Yes Yes Add CSS to control how objects on a web page are presented
@alexpchin
alexpchin / express_intro_css.css
Created March 31, 2015 06:46
Expres Intro CSS
body {
text-align: center;
margin: 0;
}
header {
height: 60px;
line-height: 60px;
width: 100%;
background: #7fbd42;
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">
{{ user.name }} | Business Card Generator
</a>
</div>
</div>
</nav>
<div class="container-fluid">
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
@alexpchin
alexpchin / irb-pimping.md
Last active August 29, 2015 14:25
Pimping irb

gem install irbtools

Optional.

require 'irb/completion'
require 'map_by_method'
require 'what_methods'
require 'pp'
IRB.conf[:AUTO_INDENT]=true
@alexpchin
alexpchin / useful-sqlite3-commands.md
Created July 22, 2015 12:34
Useful sqlite3 commands

List the tables in your database:

.tables

List how the table looks:

.schema tablename

Print the entire table:

@alexpchin
alexpchin / authentication_with_bcrypt_in_rails_4.md
Last active August 29, 2015 14:26 — forked from thebucknerlife/authentication_with_bcrypt_in_rails_4.md
Simple Authentication in Rail 4 Using Bcrypt

#Simple Authentication with Bcrypt

This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.

The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).

You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault

##Steps

@alexpchin
alexpchin / gist:b42343922a96698abd18
Last active August 29, 2015 14:27 — forked from liamcurry/gist:2597326
Vanilla JS vs jQuery

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@alexpchin
alexpchin / Git.md
Last active August 29, 2015 14:27 — forked from yegeniy/Git.md
git: commands I commonly use, relevant ramblings, and configuration.

Commands I Commonly Use

  1. Clone an existing repository:

    git clone <repo>

    (e.g. https://gist.github.com/1125520.git).

  2. [Checkout and pull an existing branch][gcp]: