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
/** | |
* Type-level Tower of Hanoi | |
* by Travis Brown | |
* | |
* Note: not optimal, and probably won't work for some valid inputs. | |
* Tested with Scala 2.9.2 and Shapeless 1.2.3. | |
*/ | |
import shapeless._, Nat._ |
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
import shapeless._, Nat._ | |
trait FizzBuzz[N <: Nat] { | |
type R3 <: Nat | |
type R5 <: Nat | |
def ti: ToInt[N] | |
def prev: List[String] | |
def d3: R3 =:= _0 | |
def d5: R5 =:= _0 |
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 | |
//... | |
class Module implements ApigilityProviderInterface | |
{ | |
public function onBootstrap($e) | |
{ | |
$app = $e->getTarget(); |
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
public function onBootstrap(MvcEvent $e) | |
{ | |
$eventManager = $e->getApplication()->getEventManager(); | |
// load site | |
$eventManager->attach(MvcEvent::EVENT_ROUTE, function ($e) { | |
$serviceManager = $e->getApplication()->getServiceManager(); | |
$request = $e->getRequest(); | |
$siteMapper = $serviceManager->get('Application\Site\SiteMapper'); |
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
npm ERR! Error: EACCES, unlink '/home/shafox/.npm/broccoli-sane-watcher/0.0.1/package' | |
npm ERR! { [Error: EACCES, unlink '/home/shafox/.npm/broccoli-sane-watcher/0.0.1/package'] | |
npm ERR! errno: 3, | |
npm ERR! code: 'EACCES', | |
npm ERR! path: '/home/shafox/.npm/broccoli-sane-watcher/0.0.1/package', | |
npm ERR! parent: 'ember-cli' } | |
npm ERR! | |
npm ERR! Please try running this command again as root/Administrator. | |
npm ERR! System Linux 3.2.0-63-generic |
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
<VirtualHost *:80> | |
ServerName business.localhost.app | |
ServerAdmin webmaster@localhost | |
#DocumentRoot /var/www/html | |
ProxyPass / http://0.0.0.0:4300 | |
<VirtualHost> |
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 | |
namespace SomeApi; | |
use ZF\ApiProblem\ApiProblem; | |
use ZF\ApiProblem\ApiProblemResponse; | |
class Module | |
{ | |
public function onBootstrap($e) | |
{ |
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
http://api.server/resource/id/child/:id | |
where resource id is compulsory but child's not. So that when queries for all resource's child the request will fire up | |
as http://api.server/resource/id/child , for creating a new child would be same. | |
For individual child records it would be http://api.server/resource/id/child/: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
{"feed":[{"id":"10","type":"Join LMS","action":"Joined LMS","status":"70","iFirstName":"ajsbdkjb","iLastName":"kjbdnkjdabnkjsdn","iUsername":"ajsbdkjb-kjbdnkjdabnkjsdn648","rFirstName":null,"rLastName":null,"rUsername":null,"iTeamName":null,"iTeamUrl":null,"rTeamName":null,"rTeamUrl":null,"feed":" has Joined LMS"},{"id":"11","type":"Profile Create","action":"Created","status":"70","iFirstName":"ajsbdkjb","iLastName":"kjbdnkjdabnkjsdn","iUsername":"ajsbdkjb-kjbdnkjdabnkjsdn648","rFirstName":null,"rLastName":null,"rUsername":null,"iTeamName":null,"iTeamUrl":null,"rTeamName":null,"rTeamUrl":null,"feed":"ajsbdkjb-kjbdnkjdabnkjsdn648 has created player profile."},{"id":"12","type":"Profile Update","action":"Updated","status":"70","iFirstName":"ajsbdkjb","iLastName":"kjbdnkjdabnkjsdn","iUsername":"ajsbdkjb-kjbdnkjdabnkjsdn648","rFirstName":null,"rLastName":null,"rUsername":null,"iTeamName":null,"iTeamUrl":null,"rTeamName":null,"rTeamUrl":null,"feed":"ajsbdkjb-kjbdnkjdabnkjsdn648 has updated profile."},{"id":"4","t |
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
model | |
Object {user: Class, feeds: Class} | |
feeds: Class | |
__ember1394281568565: "ember702" | |
__ember1394281568565_meta: Object | |
_attributes: Object | |
_changesToSync: Object | |
_data: Object | |
action: "Joined LMS" | |
created: undefined |
NewerOlder