Skip to content

Instantly share code, notes, and snippets.

NKjoep / package.json
Last active Oct 26, 2019
svg spriter example
View package.json
"name": "spriter",
"version": "0.0.0",
"main": "spriter.js",
"scripts": {
"start": "node spriter.js"
"author": "Andrea D. <>",
"license": "MIT",
"dependencies": {
  • Make sure you are aware of the problem/feature.
  • Don't be rude, be polite.
  • Give suggestions and make clear why do you think you suggestion is better than the current approach.
  • Don't point out just the bad things, tell about what do you think is great as well.
  • Make it part of your daily workflow. (use github notifications)


NKjoep / express.request.mock.ts
Created Jun 13, 2018
Mock ExpressJS request object
View express.request.mock.ts
function emptyRequest() {
return {
_destroy: undefined,
_read: undefined,
accepted: [],
accepts: undefined,
acceptsCharsets: undefined,
acceptsEncodings: undefined,
acceptsLanguages: undefined,
addListener: undefined,
NKjoep / ng1-route-sample.js
Created Nov 15, 2017
View ng1-route-sample.js
.state('competition', {url: '/:lang/'+ getLocalizedString('URL.COMPETITION'), ...})
NKjoep /
Last active Nov 16, 2015 preferred bookmarklet activator
javascript: (function(){
NKjoep / palindrome-finder.js
Created Nov 14, 2015
Javascript Palindromes of Anagrams
View palindrome-finder.js
* Returns `true` if any of the given string contains a palindrome.
* @param {String} s the string to test
function PalindromeFinder(s) {
//build an array of characters from the string `s`
var chars = s.split('');
//store how many of the same char within the string (so the array)
var charsOccurences = {};
View angular-list-models.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Input Sample</title>
<link rel="stylesheet" href="">
<script src=""></script>
NKjoep /
Last active Aug 29, 2015
PostreSQL Setup


  host	all	all	trust


NKjoep / jsp-date-manipulation-sample.jsp
Created Dec 16, 2013
JSP date manipulation sample: increase time give a date sample...
View jsp-date-manipulation-sample.jsp
<%@ page contentType="text/plain; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="" %>
<%@ taglib prefix="fmt" uri="" %>
<%@ taglib prefix="fn" uri="" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="wp" uri="/aps-core" %>
<%@ taglib prefix="wpsa" uri="/apsadmin-core" %>
<%@ taglib prefix="wpsf" uri="/apsadmin-form" %>
<c:set var="random"><%= java.lang.Math.round(java.lang.Math.random() * 6) %></c:set>
<c:set var="startDate" value="${param.lastStreamTimestamp}" />
NKjoep / ua-analyzer.jsp
Last active Oct 27, 2016
JSP User Agent analyzer
View ua-analyzer.jsp
<%@ taglib prefix="c" uri="" %>
<%@ taglib prefix="fmt" uri="" %>
<%@ taglib prefix="fn" uri="" %>
<c:set var="ua" value="${fn:toLowerCase(header['User-Agent'])}" />
<c:set var="chrome" value="${fn:contains(ua, 'chrome') && !fn:contains(ua, 'msie')}" />
<fmt:formatNumber var="chrome_version" value="${ chrome ? fn:substringBefore(fn:substringAfter(ua, 'chrome/'), '.') : 0}" />
<c:set var="ff" value="${fn:contains(ua, 'firefox') && !fn:contains(ua, 'opera')}" />
<fmt:formatNumber var="ff_version" value="${ ff ? fn:substringBefore(fn:substringAfter(ua, 'firefox/'), '.') : 0}" />
<c:set var="opera" value="${fn:contains(ua, 'opera')}" />
<fmt:formatNumber var="opera_version" value="${opera ?
You can’t perform that action at this time.