Skip to content

Instantly share code, notes, and snippets.

View Vheissu's full-sized avatar
💭
SURFING THE INTERNET

Dwayne Charrington Vheissu

💭
SURFING THE INTERNET
View GitHub Profile
const crossDomainHandler = (req, res, next) => {
res.header('Access-Control-Allow-Origin', 'http://localhost:8080/');
res.header('Access-Control-Allow-Credentials', true);
res.header('Access-Control-Allow-Methods', 'GET, PUT, POST, DELETE');
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
next();
};
var crossDomainHandlers = (req, res, next) => {
res.header('Access-Control-Allow-Origin', 'http://localhost:8080/');
res.header('Access-Control-Allow-Credentials', true);
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
next();
};
@Vheissu
Vheissu / app.html
Last active September 17, 2018 04:27
Kent C. Dodds example
<template>
<require from="./counter"></require>
<counter></counter>
</template>
@Vheissu
Vheissu / app.html
Created August 25, 2017 04:06
Basic Aurelia Gist Skeleton
<template>
<h1>App.html</h1>
<router-view></router-view>
</template>
@Vheissu
Vheissu / app.html
Last active July 19, 2017 06:53
Checking for user provided slots
<template>
<require from="./modal"></require>
<modal>
<div slot="modalHeader">This is user provided header content.</div>
</modal>
</template>
@Vheissu
Vheissu / app.html
Last active July 13, 2017 02:05
Example
<template>
<div repeat.for="item of items" matcher.bind="matcher">${item.text}</div>
</template>
@Vheissu
Vheissu / app.html
Last active July 12, 2017 03:23
Layout and Layout ViewModel example
<template>
<router-view></router-view>
</template>
@Vheissu
Vheissu / app.html
Created June 30, 2017 01:15
Aurelia Hello, World
<template>
<h1>Hello, World!</h1>
</template>
@Vheissu
Vheissu / app.html
Last active June 28, 2017 10:24
Example of a simple string loop in Aurelia
<template>
<ul>
<li repeat.for="name of names">${name}</li>
</ul>
<ol>
<li repeat.for="name of nameObjects">${name.name} has made ${name.commits} commits.</li>
</ol>
</template>
@Vheissu
Vheissu / app.html
Last active June 28, 2017 10:11
Example of visibility toggling in Aurelia
<template>
<h1 show.bind="showMe">Now you see me...</h1>
<button type="button" click.delegate="showMe = !showMe">Toggle Visibility</button>
</template>