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 8000Each 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| # What your call should look like | |
| AddressModel.formatted | |
| # the definition | |
| my_var = [ | |
| address_line1, | |
| address_line2, | |
| address_city, | |
| "#{address_state} #{address_zip}" | |
| ].reject(&:blank?).join(", ") |
| //call back should be your getInfo function, which now should look like getInfo(url, callback) | |
| //callback should be some non-blocking async function | |
| function SyncQueue(maxWorkers, callback){ | |
| var newQueue = { | |
| "maxWorkers": maxWorkers, | |
| "currentWorkers": 0, | |
| "pendingUrls": [], | |
| //use this to add a url to the queue |
| VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 26 2015 17:51:52) | |
| Included patches: 1-761 | |
| Compiled by patrick@patrick-linux-dev | |
| Huge version with GTK2 GUI. Features included (+) or not (-): | |
| +acl +farsi +mouse_netterm +syntax | |
| +arabic +file_in_path +mouse_sgr +tag_binary | |
| +autocmd +find_in_path -mouse_sysmouse +tag_old_static | |
| +balloon_eval +float +mouse_urxvt -tag_any_white | |
| +browse +folding +mouse_xterm -tcl | |
| ++builtin_terms -footer +multi_byte +terminfo |
Host git-account-1
HostName github.com
IdentityFile /home/myaccount/.ssh/account1.pem
User git
Host git-account-2
HostName github.com
IdentityFile /home/myaccount/.ssh/account2.pem
User git
| = pad_fields.fields_for :icon_pad_names do |pad_name_fields| | |
| - if pad_name_fields.object.language.enabled | |
| .mdl-textfield.mdl-js-textfield.mdl-textfield--floating-label | |
| = pad_name_fields.text_field :name, class: "mdl-textfield__input" | |
| = pad_name_fields.label :name, class: "mdl-textfield__label" do | |
| = pad_name_fields.object.language.name | |
| function generateEveryValidAttributeName(); | |
| function toJSONObject(item){ | |
| var jsonString = "{"; | |
| var everyAttribute = | |
| for(i=0; i<generateEveryValidAttributeName(); i++){ | |
| if(item.hasOwnProperty(generateEveryValidAttributeName()[i]){ | |
| jsonString = jsonString + | |
| '"' + generateEveryValidAttributeName()[i] + '": ' + | |
| item[generateEveryValidAttributeName()[i]].to_json() + ','; |
| ----- template ------ | |
| <my-section> | |
| <header> | |
| {{dirList.length}} | |
| </header> | |
| <section-body> | |
| <my-dir/> | |
| </section-body> | |
| </my-section> |
| Two tables: | |
| Categories | |
| :id, | |
| :name | |
| Instances | |
| :id, | |
| :category_id, | |
| :another_id, |
| class ApplicationController < ActionController::Base | |
| private | |
| #shared code, called from different controlers to render custom_json | |
| #from their models with optional params | |
| def render_custom_json(model, opts={}) | |
| #check if model is a relation and a record and cheat check that it's items | |
| #respond to :custom_json | |
| if((model.is_a?(ActiveRecord::Relation) || model.is_a?(Enumerable)) && | |
| model.first.respond_to?(:custom_json)) |