- Preface
- Quick Reference
- General Naming
- Specific Naming
- Layout
- Variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(['jquery', 'bootbox'], function($, bootbox){ | |
/** | |
* @author [email protected] | |
* @constructor | |
*/ | |
var Popper = function(){}; | |
/** | |
* Flat map of semantic interface methods to Deferred object methods. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div cool-stuff> | |
<ul> | |
<li class="active"><a class="link" href="#one">Click Me For One</a></li> | |
<li><a class="link" href="#two">Click Me For Two</a></li> | |
</ul> | |
<p id="one" class="content">Some Cool stuff</p> | |
<p id="two" class="content hidden">Some Other Stuff</p> | |
</div> |
I hereby claim:
- I am young-steveo on github.
- I am youngsteveo (https://keybase.io/youngsteveo) on keybase.
- I have a public key whose fingerprint is A446 0008 5127 8FC9 4B0F EDE4 727C 3EA1 4247 B30B
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Factory | |
function createPdfsController(container) { | |
// the dependencies required by the service. This is still lazily evaluated, | |
// and mockable as long as you register the mock before accessing the service | |
// in your tests. | |
const PdfService = container.service.PdfGenerator; | |
return { | |
create: (req, res, next) => { | |
const content_id = req.params.content_id; | |
const pdf_id = PdfService.generate(content_id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const glob = require('glob'); | |
const express = require('express'); | |
const Bottle = require('bottlejs'); | |
const bottle = Bottle.pop('MyPdfApp'); // name your instance here. | |
glob.sync(path.join(path.resolve(__dirname), 'app/**/*.js')).forEach((match) => { | |
require(match); // just require, no need to pass the bottle reference. | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP MESSAGE----- | |
Version: Keybase OpenPGP v2.0.53 | |
Comment: https://keybase.io/crypto | |
wcFMA6nGlPiddoX9AQ/+M/7mRkzgaaS+aV5R1ZgUkEq3ohEC2mJToKwOHObulm1g | |
gNLRo3dHQjaJSfE0Egeli3HSAz+9j5NbjFZ5w9m1Rh59v8k5FHN/gXJPbls7d1OZ | |
lE7F1jVjjUUnt+2jMtFbf6dZCDsbm3QFZLQkasUUIwAbdGr/FOd/3mbf8ZLLaspD | |
5l2/p03fINCdAypVilZ2dOGxje8CVPA576Megn2qIo5wwdeRoLlNLVlCwHtyNQC/ | |
KFjuVu6mUCwQM7oU4ChdJZeAnT/rY7iQOHJUmH2Gcj2uuYO1hZukuPD2sVYRK/Zk | |
yCFLolW1Gm2+6atQFki45U1qwWKAOHmvRWVUC9xxK/vydWKZssYp3Yvc1MrhjMvE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
final class User extends Requester { | |
public function search(array $params) : array { | |
if (empty($params["username"])) { | |
throw new \Exception("Username is required."); | |
} | |
if (empty($params["name"])) { | |
$first = $params["first_name"] ?? ''; | |
$last = $params["last_name"] ?? ''; | |
$params["name"] = "$first $last"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
final class SearchParams { | |
private $username; | |
private $name; | |
public function __construct(string $username, string $name) { | |
$this->username = $username; | |
$this->name = $name; | |
} | |
public function toArray() : array { | |
return [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
final class User extends Requester { | |
public function search(SearchParams $params) : array { | |
return $this->request($params->toArray())->toArray(); | |
} | |
} |
OlderNewer