Skip to content

Instantly share code, notes, and snippets.

Wouter wouterhund

Block or report user

Report or block wouterhund

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
@wouterhund
wouterhund / google.php
Created Jun 26, 2013
Check if IP is google
View google.php
<?php
function isGoogle() {
$rdns = gethostbyaddr($_SERVER["REMOTE_ADDR"]);
$google = ".google.com";
return substr_compare($rdns, $google, -strlen($google), strlen($google)) === 0;
}
View magento-db-dump.sh
#!/usr/bin/env bash
set -e -u
print_usage() {
echo "Usage:
mage-dump <OPTIONS> [database]
Dumps a magento database without logging data
-u <db_user> DB username
-p <db_pass> DB password
-h <db_host> DB host
View install-module-magento.sh
#!/usr/bin/env bash
set -e -u
print_usage() {
echo "Usage:
mage-module <OPTIONS> git://module/source.git <modulename>
Installs a magento module with dedicated installation for testing
-u <db_user> DB username
-p <db_pass> DB password
-d <db_name> DB name (default: mage_test_modulename)
View Jsondata.php
<?php
/**
* @category Drecomm
* @package Drecomm_Socialcore
* @author Wouter Hünd <w.hund@drecomm.nl>
*/
class Drecomm_Socialcore_Block_Adminhtml_Tabs_Promo_Renderer_Jsondata
extends Varien_Data_Form_Element_Abstract
{
@wouterhund
wouterhund / autorefresh.user.js
Last active Dec 17, 2015
Automatically refreshes Google Docs every 5 minutes
View autorefresh.user.js
// ==UserScript==
// @name AutoRefreshDocs
// @description Automatically refershes Google Docs links
// @namespace http://drecomm.nl
// @author Wouter Hünd
// @include https://docs.google.com/*
// @grant none
// ==/UserScript==
setInterval(function() {
View magento-db-dump.sh
export MySQLDUMP_HOSTNAME=
export MySQLDUMP_USERNAME=
export MySQLDUMP_DATABASE=
export MySQLDUMP_PASSWORD=
mysqldump -p$MySQLDUMP_PASSWORD -h$MySQLDUMP_HOSTNAME -u$MySQLDUMP_USERNAME ${MySQLDUMP_DATABASE} \
--ignore-table=${MySQLDUMP_DATABASE}.core_cache \
--ignore-table=${MySQLDUMP_DATABASE}.core_cache_tag \
--ignore-table=${MySQLDUMP_DATABASE}.log_url \
--ignore-table=${MySQLDUMP_DATABASE}.log_url_info \
View build-test.xml
<!-- Voor het test project, voor je ant.properties:
test.runner=com.zutubi.android.junitreport.JUnitReportTestRunner
test.project.package=nl.hsl.roosters
tested.project.dir=../ipsen6-client-android
-->
<?xml version="1.0" encoding="UTF-8"?>
<project name="ipsen6-client-android-unittest" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
You can’t perform that action at this time.