YARD CHEATSHEET http://yardoc.org
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.
server { | |
listen 80; | |
# Proxy settings | |
proxy_redirect off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real_IP $remote_addr; | |
proxy_set_header X-Forwarded_For $proxy_add_x_forwarded_for; | |
location /api/ { |
mr Marathi | |
bs Bosnian | |
ee_TG Ewe (Togo) | |
ms Malay | |
kam_KE Kamba (Kenya) | |
mt Maltese | |
ha Hausa | |
es_HN Spanish (Honduras) | |
ml_IN Malayalam (India) | |
ro_MD Romanian (Moldova) |
// app/transforms/array.js | |
import Ember from 'ember'; | |
import DS from 'ember-data'; | |
export default DS.Transform.extend({ | |
deserialize: function(value) { | |
if (Ember.isArray(value)) { | |
return Ember.A(value); | |
} else { | |
return Ember.A(); |
Here's how it's going to look like from the end user perspective:
1 hour before my PRO membership ends, if I am on a recurring plan Hummingbird will try to charge my credit card. If it succeeds everything is good. If it fails my subscription will run out and Hummingbird will try to charge my credit card again tomorrow, 3 days from now and 5 days from now. I will receive an email from Hummingbird if the charge is successful, and a different email every time charging my card fails.
CREATE TABLE files | |
( | |
id integer unsigned not null auto_increment, | |
hash_sha1 binary(160), | |
filename varchar(255), | |
size integer unsigned, | |
mime varchar(255), | |
unique index index_files_by_id (id), | |
index index_files_by_sha1 (hash_sha1), |
! Enable alpha channel | |
URxvt.depth: 32 | |
! Set base colors | |
URxvt.background: [80]#E7E7E7 | |
URxvt.foreground: #30343A | |
URxvt.cursorColor: #30343A | |
! Scrollbar at right | |
URxvt.scrollColor: #d0d0d0 |
var substring = function(all, start, end) { | |
if (start >= end) { | |
console.log(all[start]); | |
} else { | |
return all[start] + substring(all, start + 1, end); | |
} | |
}; | |
console.log(substring("lorem ipsum dolor", 6, 10)); |
//app.js | |
var express = require('[email protected]'), | |
connect = require('[email protected]'), | |
... | |
//packages json | |
"dependencies": { | |
"express": "2.2.2" |
exports.flex_get = function(key, secret, path) { | |
return function(req, res, next) { | |
var apisig = crypto.createHash('md5').update(secret + 'ApiKey' + key + 'ServicePath/v1' + path + 'AuthToken' + req.flex_auth_token).digest('hex'); | |
var options = { | |
host: 'api.website.com', | |
port: 443, | |
path: '/v1' + path + '?AuthToken=' + req.flex_auth_token + '&ApiSig=' + apisig, | |
method: 'GET' | |
}; | |
var request = https.request(options, function(response) { |