Skip to content

Instantly share code, notes, and snippets.

View ericalli's full-sized avatar
🎯
Focusing on @getsiimple

Eric Alli ericalli

🎯
Focusing on @getsiimple
View GitHub Profile
@ericalli
ericalli / USER_AUTH_RAILS_EXAMPLE.md
Created May 24, 2020 08:14 — forked from mdang/USER_AUTH_RAILS_EXAMPLE.md
Lesson: User Auth (Rails Example)

User Auth with Rails (The Fun Way)

Starting a new project

$ rails new user_auth --database=postgresql
$ cd user_auth
@ericalli
ericalli / wp.sh
Created July 12, 2017 05:06 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@ericalli
ericalli / each vs map.rb
Created October 27, 2012 00:12 — forked from jamiew/each vs map.rb
each vs map usage in ruby
json = ActiveSupport::JSON.decode(google)['predictions']
# sort of traditional for() loop style
results = []
json.each do |location|
results << {
:short => 'foo',
:long => 'bar'
}
end