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
/**
* I love this hack <3
*
* @param $var
* @return string
*/
function dump($var){
echo '<pre>';
var_dump($var);
echo '</pre>';
@koenhendriks
koenhendriks / designer.html
Created December 17, 2014 14:33
designer
<link rel="import" href="../polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@koenhendriks
koenhendriks / jquery.center.js
Created December 27, 2014 22:05
jQuery center extension
$.fn.extend({
center: function() {
this.css("position", "absolute");
this.css("top", Math.max(0, (($(window).height() - $(this).outerHeight()) / 2) +
$(window).scrollTop()) + "px");
this.css("left", Math.max(0, (($(window).width() - $(this).outerWidth()) / 2) +
$(window).scrollLeft()) + "px");
return this;
}
});
@koenhendriks
koenhendriks / gist:e643d20e2f985b146ac7
Created January 28, 2015 08:13
One line Ghosts test
wget https://gist.githubusercontent.com/amlweems/6e78d03810548b4867d6/raw/69e2fb429dc6f020954405a9d55021db8db1d26e/gistfile1.c && mv gistfile1.c GHOST.c && gcc GHOST.c -o GHOST && clear && ./GHOST
@koenhendriks
koenhendriks / Simple-Star-Rating.markdown
Created February 11, 2015 22:13
Simple Star Rating
@koenhendriks
koenhendriks / TaxPrice.php
Created April 18, 2015 11:38
TaxPrice Class
<?php
/**
* TaxPrice.php
* Created by: koen
* Date: 18-4-15
* Time: 12:41
*/
class TaxPrice {
@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');
checkForgotFields(){
var check = false;
var email = $('#email').val();
var securityq = $('#securityq').val();
var securitya = $('#securitya').val();
if(email != '' && securitya != '' && securityq !=''){
check = true;
}
return check;
@koenhendriks
koenhendriks / getMagnet.php
Last active December 27, 2015 23:06
Pirate Bay Movie Fetcher
<?php
/**
* Small little function to read out The Pirate Bay.
* This will look make a search on The Pirate Bay
* and return the first result it gets from the HD - Movies category
*
* Example:
* $magnetUrl = getMagnet('Fight Club', 'YIFY');
*
* @author Koen Hendriks <info@koenhendriks.com>