git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
// Importing packages | |
const express = require("express"), | |
bodyParser = require("body-parser"), | |
methodOverride = require("method-override"), | |
redis = require("redis") | |
// Init application | |
const app = express() | |
// initialising body parser |
<?php | |
/** | |
* Normalize the given (partial) name of a person. | |
* | |
* - re-capitalize, take last name inserts into account | |
* - remove excess white spaces | |
* | |
* Snippet from: https://timvisee.com/blog/snippet-correctly-capitalize-names-in-php | |
* |
"use strict" | |
let cacheVersion = 3 | |
const offlineUrl = "offline-page.html" | |
self.addEventListener("install", event => { | |
event.waitUntil(caches.open("offline-cache-" + cacheVersion).then(cache => cache.addAll([ | |
"/index.html", | |
offlineUrl, | |
// other more url of files, css, js etc. |
... | |
<script> | |
if ("serviceWorker" in navigator) { | |
navigator.serviceWorker.register("/service-worker.js").then((registration) => { | |
console.log("Service worker registered successfully with scope: ", registration.scope) | |
}).catch((error) => { | |
console.error("Service worker registration failed.", error) | |
}) | |
} else { |
<?php | |
class UserController | |
{ | |
/** | |
* @SWG\Post(path="/user", | |
* tags={"user"}, | |
* summary="Create user", | |
* description="This can only be done by the logged in user.", |
<?php | |
class UserController | |
{ | |
public function lists() | |
{ | |
// Create a fractal instance | |
$fractal = new \League\Fractal\Manager(); | |
// to enable links support, we need to set a baseUrl on serializer |