Skip to content

Instantly share code, notes, and snippets.

View akkerman's full-sized avatar

Marcel Akkerman akkerman

View GitHub Profile
@akkerman
akkerman / debounce.js
Last active April 4, 2018 09:25 — forked from nmsdvid/new_gist_file.js
Simple JavaScript Debounce Function
// Returns a function, that, as long as it continues to be invoked, will not
// be triggered. The function will be called after it stops being called for
// N milliseconds. If `immediate` is passed, trigger the function on the
// leading edge, instead of the trailing.
function debounce(func, wait, immediate) {
var timeout;
return function() {
var context = this, args = arguments;
clearTimeout(timeout);
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:sap="http://www.sap.com/Protocols/SAPData">
<edmx:Reference Uri="http://s4-1610.creetion.com:50000/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/Vocabularies(TechnicalName='%2FIWBEP%2FVOC_COMMON',Version='0001',SAP__Origin='')/$value" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common"/>
</edmx:Reference>
<edmx:DataServices m:DataServiceVersion="2.0">
<Schema Namespace="EAM_OBJPG_MAINTNOTIFICATION_SRV" xml:lang="en" sap:schema-version="1" xmlns="http://schemas.microsoft.com/ado/2008/09/edm">
<EntityType Name="NotificationTypeImage" m:HasStream="true" sap:content-version="1">
<Key>
<PropertyRef Name="RequestImage"/>
@akkerman
akkerman / bijlage-toevoegen.html
Created December 6, 2016 14:16
bijlage toevoegen
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<style>
.form-group.required .control-label:after {
content:" *";
}
</style>
<div class="panel panel-default">
@akkerman
akkerman / git_alias.sh
Last active September 20, 2016 19:35
git alias
# open current directory in git kraken
git config --global alias.kraken '!gitkraken -p `pwd` >/dev/null 2>&1 &'
# revert a file
git config --global alias.revert 'reset HEAD --'
@akkerman
akkerman / Install PostGIS and GeoServer on Ubuntu 13.04.md
Last active May 28, 2023 01:53
Install PostGIS and GeoServer on Ubuntu 13.04

Install PostGIS and GeoServer on Ubuntu 13.04

PostGIS installation

Postgresql

Install the server:

sudo apt-get install postgresql-9.1 postgresql-contrib-9.1 pgadmin3

Execute the psql command under user postgres (sudo -u postgres)
and connect to database postgres (psql postgres):

@akkerman
akkerman / register.html
Last active March 25, 2023 10:59
registration form with basic validation
<!DOCTYPE html>
<html>
<head>
<title>Sign up to {this}</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<form method="post" target="#" onsubmit="return validate()">
@akkerman
akkerman / wgetit.sh
Last active December 21, 2015 07:58
Use wget to download a web page and pages it directly links to e.g. to download some documentation based on it's table of contents.
wget --recursive --level=1 --no-clobber --page-requisites --html-extension --convert-links --no-parent $@
@akkerman
akkerman / disks.sh
Last active December 21, 2015 07:58
shows model number of all disks and the device it is associated with
sudo hdparm -I `sudo fdisk -l | grep Disk\ / | awk '{print $2}' | sed -e 's/.$//' ` | grep --c
@akkerman
akkerman / psgrep.sh
Last active December 21, 2015 07:58
check if a certain program is running on linux without it returning the grep command itself e.g. `psgrep apache`
ps -ef | grep -v grep | grep -i --color=auto $@
Object.prototype.mixin = (aClass) ->
for key, value of aClass
@[key] = value
for key, value of aClass.prototype
@::[key] = value
@
class Voertuig
constructor: (@naam, @snelheid=0)->