Skip to content

Instantly share code, notes, and snippets.

@heardk
heardk / photo-spots.md
Last active December 11, 2016 14:51
Photo Spots
@heardk
heardk / ajax.html
Last active December 11, 2016 14:49
Resume for Tumblr Customizations
<div id="restarget">Loading…</div>
<script id="restemplate" type="x-tmpl-mustache">
<h1>{{ header.name }}
<h2>{{ header.title }}
<h3> {{ header.email }}
<p>{{ overview.text }}
</script>
{
products: [
'{{repeat(10, 10)}}',
{
_id: '{{objectId()}}',
index: '{{index()}}',
guid: '{{guid()}}',
isActive: '{{bool()}}',
img_preview: 'http://placehold.it/32x32',
img_main: 'http://placehold.it/64x64',
@heardk
heardk / commands
Last active December 10, 2016 14:31
Command List
RAILS
rails new ApplicationName – Create a new application
rails generate/g model ModelName – Creates a model with the specified model_name
rails generate/g controller ControllerName – Creates a controller with the specified controller_name
rails generate/g migration MigrationName – Creates a migration with the specified migration_name
rails generate migration AddPartNumberToProducts
rails generate/g scaffold ModelName ControllerName – A shortcut for creating your controller, model and view files etc
rails g scaffold Admin::FileShare location:string access_type:string - Prefix a namespace for a model
rails generate resource NAME - Stubs out a controller without any actions and no views, but does include routes and tests ..