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
View vscode-extensions
raymonschouwenaar / raterize.js
Created Dec 1, 2016
Image render from HTML with PhantomJS
View raterize.js
"use strict";
var page = require('webpage').create(),
system = require('system'),
address, output, size, pageWidth, pageHeight;
if (system.args.length < 3 || system.args.length > 5) {
console.log('Usage: rasterize.js URL filename [paperwidth*paperheight|paperformat] [zoom]');
console.log(' paper (pdf output) examples: "5in*7.5in", "10cm*20cm", "A4", "Letter"');
console.log(' image (png/jpg output) examples: "1920px" entire page, window width 1920px');
console.log(' "800px*600px" window, clipped to 800x600');
raymonschouwenaar / index.html
Last active Nov 22, 2016
Is the Notification API supported in the visitors browser?
View index.html
<title>Test Web Notification API Support</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<base href="/">
.message {
padding: 1rem;
color: #fff;
raymonschouwenaar / makeUppercase.filter.js
Created Nov 1, 2016
Custom Filter for AngularJS 1.5
View makeUppercase.filter.js
app.filter('makeUppercase', function () {
return function (item) {
return item.toUpperCase();
View special-button.directive.js
'use strict';
* Special button directive
.directive('specialButton', function () {
return {
restrict: 'A',
link: function(scope, element, attrs) {
raymonschouwenaar / categories.controller.js
Last active Nov 1, 2016
Example controller for Angular 1.5
View categories.controller.js
'use strict';
* categoryNew controller of the angularApp
function ($scope, $state, currentUser, CategoriesFactory) {
$ = {
title: 'New categorie',
raymonschouwenaar / array.service.js
Created Nov 1, 2016
Example AngularJS 1.5 Service
View array.service.js
'use strict';
* Array service
.service('arrayService', function() {
function swapArray(tempArray, newArray, indexA, indexB) {
var temp = tempArray[indexA];
raymonschouwenaar / duplicate-properties-array-of-objects-with-javascript.js
Last active Aug 24, 2016
How to find duplicate properties values in an array of objects with JavaScript
View duplicate-properties-array-of-objects-with-javascript.js
var myArray = [
{id: 1, name: 'Foo Bar', email: ''},
{id: 2, name: 'Bar Foo', email: ''},
{id: 3, name: 'Joe Ocean', email: ''},
{id: 3, name: 'Jenny Block', email: ''},
function checkDuplicateInObject(propertyName, inputArray) {
var seenDuplicate = false,
testObject = {};

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
View data.csv
date close
1-May-12 58.13
30-Apr-12 53.98
27-Apr-12 67.00
26-Apr-12 89.70
25-Apr-12 99.00
24-Apr-12 130.28
23-Apr-12 166.70
20-Apr-12 234.98
19-Apr-12 345.44
You can’t perform that action at this time.