Skip to content

Instantly share code, notes, and snippets.

View jaykilleen's full-sized avatar

Jay Killeen jaykilleen

View GitHub Profile
@iscott
iscott / simple_authentication_rails_5_bcrypt_and_has_secure_password.md
Last active March 15, 2024 03:23
Cheat Sheet: Simple Authentication in Rails 5 with has_secure_password

Cheat Sheet: Simple Authentication in Rails 6 with has_secure_password

The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.

First the simplest/core layers, then optional layers depending on which features/functionality you want.

Specs
AUTHOR Ira Herman
LANGUAGE/STACK Ruby on Rails Version 4, 5, or 6
@stakira
stakira / gfm_table.css
Last active April 6, 2019 02:56
GFM table
body {
text-size-adjust: 100%;
color: #333;
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
font-size: 16px;
line-height: 1.6;
word-wrap: break-word;
}
@arjunvenkat
arjunvenkat / gist:1115bc41bf395a162084
Last active January 12, 2024 05:04
Seeding a Rails database with a CSV file

How to seed a Rails database with a CSV file

1. Setup

First, Create a folder inside of lib called seeds

Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv

Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.

@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active April 16, 2024 16:36
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@randomecho
randomecho / australian-postcodes.sql
Last active April 11, 2024 12:08
Australian postcodes (with states and suburb names) geocoded with latitude and longitude.
/*
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod
May contain errors where latitude and longitude are off. Use at own non-validated risk.
*/
SET NAMES utf8;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS postcodes_geo;