Skip to content

Instantly share code, notes, and snippets.

View r3id's full-sized avatar
💻
Building cool stuff

Alan Reid r3id

💻
Building cool stuff
View GitHub Profile
@r3id
r3id / migrations.rb
Created April 11, 2022 20:47
Jobs Contacts Gist
create_table :contacts do |t|
t.string :first_name
t.string :last_name
end
create_table :jobs do |t|
t.string :name
t.belongs_to :owner, foreign_key: {to_table: :users}
end
@r3id
r3id / Gemfile
Created April 5, 2020 10:37
Rspec Tutorial
source 'https://rubygems.org'
gem 'rspec'
@r3id
r3id / css-toggle.html
Created March 10, 2020 20:37
CSS only toggle switch
<div class="demo-holder">
<form action="#">
<div class="switch">
<input id="switch-1" type="checkbox" class="switch-input">
<label for="switch-1" class="switch-label">Switch</label>
</div>
</form>
<style>
form {
@r3id
r3id / slack-loader.html
Last active March 10, 2020 20:08
Slack style loader
<div class="demo-holder">
<div class="loader"></div>
<style>
.loader {
margin: 0 auto;
position: relative;
width: 2.5em;
height: 2.5em;
transform: rotate(165deg);