$ rails g model User
belongs_to
has_one
<html> | |
<style> | |
body { | |
margin: 0; | |
padding 0; | |
} | |
</style> | |
<body> | |
<script> |
Testing | |
Automated testing (even though still not widely used by Objective-C developers) would make | |
refactoring much easier, faster and safer. Good test coverage would also allow maintenance | |
to be done and new features to be added without first having to fully investigate the | |
function of all parts of the codebase and the way these parts fit together. This especially | |
applies when work is contracted out to developers other than those who originally created | |
the application. | |
The lack of a comprehensive automated test suite is a real disadvantage. Adding one is |
require 'sprockets' | |
project_root = File.expand_path(File.dirname(__FILE__)) | |
assets = Sprockets::Environment.new(project_root) do |env| | |
env.logger = Logger.new(STDOUT) | |
end | |
assets.append_path(File.join(project_root, 'app', 'assets')) | |
assets.append_path(File.join(project_root, 'app', 'assets', 'javascripts')) | |
assets.append_path(File.join(project_root, 'app', 'assets', 'stylesheets')) |
# before this file is loaded, a locale should be set: | |
# | |
# In a browser environment, you can use: | |
# ```<script>__locale='en';</script>``` | |
# | |
# In a server environment (specifically node.js): | |
# ```global.__locale = 'en';``` | |
# normalize in-app locale string to "en" or "de-AT" | |
parts = @__locale.split('-') |
if defined? ActiveRecord | |
def explain(query) | |
query = query.to_sql if query.is_a?(ActiveRecord::Relation) | |
ActiveRecord::Base.connection | |
.execute("EXPLAIN ANALYZE #{query}") | |
.to_a | |
.each { |hash| puts hash["QUERY PLAN"] } | |
nil |
Can you please answer the following questions so we can assess the project, | |
and judge if we would be a good match? | |
1. Is this a new project, or is this for an existing website or application? | |
- This is a project for a completely new site or application | |
- This is a project to update an existing site or application | |
2. Which of the following areas do you need help with? |
#!/usr/bin/env node | |
// this file is stored in a directory of APP_ROOT/script for me, all things are relative to that | |
var APP_ROOT = __dirname+"/../"; | |
// this assumes there is a file stored in APP_ROOT called "config.js" with the following structure: | |
// | |
// module.exports = { | |
// "development: { | |
// "postgresql": "tcp://postgres@localhost/dev-db" |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
(* | |
* New-iTerm-Window.scpt | |
* | |
* Intended for use with QuickSilver | |
* I mapped option-y to running this script to create | |
* a new iTerm window on the current workspace | |
* | |
* Based on much Googling - very little "original" code here | |
* Comments/Suggestions to brad.lhotsky@gmail.com | |
*) |