Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
<%= form_tag registration_index_path do %> | |
<%= fields_for User.new do |u| %> | |
<%= u.label :phone %> | |
<%= u.text_field :phone %> | |
<% end %> | |
<p> | |
<%= label_tag :workout %> | |
<%= check_box_tag :workout %> | |
</p> | |
<p> |
<% @posts.each do |post|%> | |
<div id="recentpost"> | |
<%= post.name %><br/><br/> | |
</div> | |
<% end %> |
// Async web fetch with JSON parse | |
[NSURLConnection sendAsynchronousRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"url"]] | |
queue:nil completionHandler:^(NSURLResponse *r, NSData *d, NSError *e) { | |
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:d | |
options:0 | |
error:nil]; | |
}]; | |
// Using the camera |
# app/controllers/users/password_controller.rb | |
class Users::PasswordsController < Devise::PasswordsController | |
def resource_params | |
params.require(:user).permit(:email, :password, :password_confirmation) | |
end | |
private :resource_params | |
end |
# Procfile | |
web: bundle exec rails server -p $PORT | |
faye: bundle exec thin -p 8081 -R faye_config.ru start |
# config/routes.rb | |
namespace :api, defaults: {format: "json"} do | |
namespace :v1 do | |
resources :wines | |
end | |
end | |
# wines_controller | |
class WinesController | |
def index |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
Originally: | |
https://gist.github.com/7565976a89d5da1511ce | |
Hi Donald (and Martin), | |
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I | |
appreciate the tone. This is a Yegge-long response, but given that you and | |
Martin are the two people best-situated to do anything about this, I'd rather | |
err on the side of giving you too much to think about. I realize I'm being very | |
critical of something in which you've invested a great deal (both financially |