Skip to content

Instantly share code, notes, and snippets.

View koenhendriks's full-sized avatar
🏠
Working from home

Koen Hendriks koenhendriks

🏠
Working from home
View GitHub Profile
@koenhendriks
koenhendriks / TaxPrice.js
Last active August 29, 2015 14:24
TaxPrice Object
/**
* TaxPrice
* Created by: Koen
* Date: 6-7-15
* Time: 10:50
*
* @param price
* @param isTaxPrice
* @param taxRate
* @constructor
@koenhendriks
koenhendriks / scrap.php
Created December 9, 2015 12:32
Simple scrapper for deep in radio
<?php
/**
* Radio Scanner
* Created by: koen
* Date: 12/9/15
* Time: 12:44 PM
*/
require_once('simple_html_dom.php');
@koenhendriks
koenhendriks / shake.js
Created March 10, 2016 13:27
Harlem Shake
javascript:(function(){function c(){var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");e.setAttribute("href",f);e.setAttribute("class",l);document.body.appendChild(e)}function h(){var e=document.getElementsByClassName(l);for(var t=0;t<e.length;t++){document.body.removeChild(e[t])}}function p(){var e=document.createElement("div");e.setAttribute("class",a);document.body.appendChild(e);setTimeout(function(){document.body.removeChild(e)},100)}function d(e){return{height:e.offsetHeight,width:e.offsetWidth}}function v(i){var s=d(i);return s.height>e&&s.height<n&&s.width>t&&s.width<r}function m(e){var t=e;var n=0;while(!!t){n+=t.offsetTop;t=t.offsetParent}return n}function g(){var e=document.documentElement;if(!!window.innerWidth){return window.innerHeight}else if(e&&!isNaN(e.clientHeight)){return e.clientHeight}return 0}function y(){if(window.pageYOffset){return window.pageYOffset}return Math.max(document.documentElement.scrollTop,document.body.scrollTop)}funct
@koenhendriks
koenhendriks / countries.json
Created March 15, 2016 15:39
List of countries with code in JSON format
[
{
"name": "Afghanistan",
"code": "AF"
},
{
"name": "Åland Islands",
"code": "AX"
},
{
@koenhendriks
koenhendriks / query.sql
Last active May 29, 2016 19:17
Oracle Query
create or replace FUNCTION F_MEDIA
(
P_DATE IN VARCHAR2 DEFAULT 24-1-2013
, P_INFLUENCE IN VARCHAR2 DEFAULT 'p'
, P_MEDIATYPE IN VARCHAR2 DEFAULT 'tv'
) RETURN NUMBER AS
CURSOR input is SELECT COUNT(CONTRACTS.CONTRACTDATE)
FROM CONTRACTS, MEDIA
WHERE
@koenhendriks
koenhendriks / gnomeShot.sh
Last active September 21, 2016 09:56
Screenshot and upload script
!/bin/sh
FILE="$(date +%F_%H-%M-%S)-scrot.png"
gnome-screenshot -f $FILE -a && ~/Documents/screenshot.sh ~/$FILE | xclip -selection clipboard && mv ~/$FILE ~/shots/
@koenhendriks
koenhendriks / TempLCD.ino
Last active December 23, 2016 12:20
Arduino file for reading temperature and displaying on LCD
/*
TempLcd.ino
2017 Copyright (c) Koen Hendriks. All right reserved.
Connect LCD:
VCC : 5v
GND : GND
SDA : A4 Arduino
SCL : A5 Arduino
@koenhendriks
koenhendriks / Laravel Docroot IspConfig 3.1 Nginx
Last active June 3, 2022 20:20
Laravel Docroot IspConfig 3.1 Nginx
location / {
root {DOCROOT}public
if ($scheme != "https") {
rewrite ^ https://$http_host$request_uri? permanent;
}
try_files /public/$uri /public/$uri/ /public/index.php?$query_string;
}
alias ..="cd .."
alias ...="cd ../.."
alias routes='artisan route:list'
alias h='cd ~'
alias c='clear'
alias art=artisan
alias dump='composer dump-autoload'
alias ide='php artisan clear-compiled && php artisan ide-helper:generate && php artisan optimize'
alias phpspec='vendor/bin/phpspec'
alias phpunit='vendor/bin/phpunit'
@koenhendriks
koenhendriks / keybase.md
Last active May 15, 2023 07:06
keybase.md

Keybase proof

I hereby claim:

  • I am koenhendriks on github.
  • I am koen_hendriks (https://keybase.io/koen_hendriks) on keybase.
  • I have a public key whose fingerprint is 0A34 B569 8C26 1565 0805 4973 4850 1615 D891 7C0C

To claim this, I am signing this object: