Skip to content

Instantly share code, notes, and snippets.

@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 ..
{
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 / 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>
@heardk
heardk / photo-spots.md
Last active December 11, 2016 14:51
Photo Spots
@heardk
heardk / rest.md
Last active December 11, 2016 22:17
Consuming REST services in ASP.Net

Consuming REST Services in ASP.Net

HTTPWebRequest

HttpWebRequest http = (HttpWebRequest)WebRequest.Create("http://example.com");
WebResponse response = http.GetResponse();

MemoryStream stream = response.GetResponseStream();
StreamReader sr = new StreamReader(stream);
string content = sr.ReadToEnd();
@heardk
heardk / angular.md
Created December 11, 2016 22:22
AngularJS & Visual Studio
@heardk
heardk / react.md
Last active December 11, 2016 22:29
React & Firebase
@heardk
heardk / posgres-in-c9.md
Created December 18, 2016 15:55 — forked from mikeumus/posgres-in-c9.md
PostgreSQL in Cloud9 IDE
Gist shortlink: https://git.io/vV0xB

Official Living Doc for Postgres in C9: https://community.c9.io/t/setting-up-postgresql/1573

@mikeumus' Postgres in Cloud9 Notes:
@heardk
heardk / ionic.md
Created May 5, 2017 20:29
Ionic Framework (Angular + Cordova)