brew update brew install postgresql
Create a database:
initdb /usr/local/var/postgres
If this is your first install, automatically load on login with:
mkdir -p ~/Library/LaunchAgents
| .git | |
| .gitignore | |
| tmp/* | |
| log/* |
| <div class="min-h-screen overflow-auto bg-black text-white"> | |
| <h1 class="py-4 text-center">Sign in to ToDo</h1> | |
| <div class="mx-auto max-w-md rounded border border-gray-600 bg-white bg-opacity-5 p-3"> | |
| <input type="email" placeholder="Email" class="block w-full rounded border border-gray-500 bg-black p-2 outline-none focus:border-white" /> | |
| <input type="password" placeholder="Password" class="mt-2 block w-full rounded border border-gray-500 bg-black p-2 outline-none focus:border-white" /> | |
| <input type="submit" value="Sign in" class="mt-3 block w-full cursor-pointer rounded bg-purple-800 p-2 outline-none hover:bg-purple-700 focus:outline focus:outline-1 focus:outline-offset-0 focus:outline-white" /> | |
| </div> | |
| </div> |
| # Assumptions: rbenv and ruby-build installed with brew | |
| # Update brew formulas | |
| brew update | |
| # Upgrade rbenv and ruby-build | |
| brew upgrade rbenv ruby-build | |
| # List available ruby versions | |
| rbenv install --list |
| defaults -currentHost write -globalDomain AppleFontSmoothing -int 2 |
| Ruby is terse. Getters and setters example. | |
| Java: | |
| Class Circle { | |
| private Coordinate center, float radius; | |
| public void setCenter(Coordinate center) { | |
| this.center = center; | |
| } | |
| public Coordinate getCenter() { |
| def error_messages_for(resource) | |
| return "" if resource.errors.empty? | |
| messages = resource.errors.full_messages.map { |msg| content_tag(:li, msg) }.join | |
| sentence = "Please fix the following errors:" | |
| html = <<-HTML | |
| <div class="error_explanation"> | |
| <div class="title">#{sentence}</div> | |
| <ul>#{messages}</ul> |
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: nginx | |
| # Required-Start: $local_fs $remote_fs $network $syslog | |
| # Required-Stop: $local_fs $remote_fs $network $syslog | |
| # Default-Start: 2 3 4 5 | |
| # Default-Stop: 0 1 6 | |
| # Short-Description: starts the nginx web server | |
| # Description: starts nginx using start-stop-daemon |
| set :application, "new-vegas" | |
| set :repository, "[email protected]:mdominiak/new-vegas.git" | |
| set :scm, :git | |
| set :host, "newvegas.vault106.com" | |
| set :user, "deploy" | |
| set :use_sudo, false | |
| set :deploy_to, "/home/deploy/new-vegas/production" | |
| role :web, host |
| update-rc.d nginx defaults |