Skip to content

Instantly share code, notes, and snippets.

Raymon S raymonschouwenaar

Block or report user

Report or block raymonschouwenaar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@raymonschouwenaar
raymonschouwenaar / domIsReady.js
Last active Nov 15, 2019
Vanilla JavaScript Document Ready (Cross-Browser)
View domIsReady.js
var domIsReady = (function(domIsReady) {
var isBrowserIeOrNot = function() {
return (!document.attachEvent || typeof document.attachEvent === "undefined" ? 'not-ie' : 'ie');
}
domIsReady = function(callback) {
if(callback && typeof callback === 'function'){
if(isBrowserIeOrNot() !== 'ie') {
document.addEventListener("DOMContentLoaded", function() {
return callback();
@raymonschouwenaar
raymonschouwenaar / deploy.bat
Last active Sep 6, 2019
# How to deploy only your dist folder to gh-pages branch (Github Pages)
View deploy.bat
git subtree push --prefix dist origin gh-pages
@raymonschouwenaar
raymonschouwenaar / var-global-function.js
Last active Aug 5, 2019
JavaScript Scoping Var Global
View var-global-function.js
var globalVariable;
globalVariable = 'I Love Pizza!';
function iChangeTheVariable() {
globalVariable = [59, 600, 843];
}
iChangeTheVariable();
View howitshouldbe.js
function average(numbers) {
let total = 0;
for (let i = 0; i < numbers.length; i++) {
total += numbers[i];
}
return total / numbers.length;
}
@raymonschouwenaar
raymonschouwenaar / day1.md
Last active May 27, 2019
NG Vikings 2019 - Notes day 1
View day1.md

Top things

  • Angular Schematics

John Papa

  • Angular Launch Angular

  • vikings2019-ext

View index.js
const jsonServer = require('json-server')
const server = jsonServer.create()
const middlewares = jsonServer.defaults()
const port = process.env.PORT || 3000
server.use(jsonServer.bodyParser)
server.use(middlewares)
server.listen(port, () => {
console.log('JSON Server is running')
View index.js
const casual = require('casual').nl_NL
View index.js
const casual = require('casual')
@raymonschouwenaar
raymonschouwenaar / index.js
Last active Mar 27, 2019
/users/index.js
View index.js
module.exports = () => {
casual.define("user", function() {
return {
name: casual.first_name,
surname: casual.last_name,
address: casual.street,
phone: casual.phone,
email: casual.email,
postalCode: casual.zip,
city: casual.city,
View program.js
const ANIMALS = [
{
date: '2019-02-10',
location: 'A',
code: 1,
},
{
date: '2019-03-17',
location: 'B',
code: 15,
You can’t perform that action at this time.