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
akamud.vscode-javascript-snippet-pack
be5invis.vscode-custom-css
bierner.markdown-preview-github-styles
christian-kohler.npm-intellisense
christian-kohler.path-intellisense
CoenraadS.bracket-pair-colorizer
dbaeumer.vscode-eslint
dline.CobaltNext
ecmel.vscode-html-css
EditorConfig.EditorConfig
@raymonschouwenaar
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
raymonschouwenaar / index.html
Last active Nov 22, 2016
Is the Notification API supported in the visitors browser?
View index.html
<html>
<head>
<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="/">
<style>
.message {
padding: 1rem;
color: #fff;
@raymonschouwenaar
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
*/
angular.module('angularApp')
.directive('specialButton', function () {
return {
restrict: 'A',
link: function(scope, element, attrs) {
@raymonschouwenaar
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
*/
angular.module('angularApp')
.controller('categoryNew',
function ($scope, $state, currentUser, CategoriesFactory) {
$scope.page = {
title: 'New categorie',
@raymonschouwenaar
raymonschouwenaar / array.service.js
Created Nov 1, 2016
Example AngularJS 1.5 Service
View array.service.js
'use strict';
/**
* Array service
*/
angular.module('angularApp')
.service('arrayService', function() {
function swapArray(tempArray, newArray, indexA, indexB) {
var temp = tempArray[indexA];
@raymonschouwenaar
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: 'foo@bar.com'},
{id: 2, name: 'Bar Foo', email: 'bar@foo.com'},
{id: 3, name: 'Joe Ocean', email: 'joe@ocean.com'},
{id: 3, name: 'Jenny Block', email: 'foo@bar.com'},
];
function checkDuplicateInObject(propertyName, inputArray) {
var seenDuplicate = false,
testObject = {};
View angularjs_directive_attribute_explanation.md

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.