Skip to content

Instantly share code, notes, and snippets.

View wgriffioen's full-sized avatar

Wim Griffioen wgriffioen

View GitHub Profile
FROM php:7.3-fpm-alpine
ENV COMPOSER_HOME /composer
ENV PATH /composer/vendor/bin:$PATH
ENV COMPOSER_ALLOW_SUPERUSER 1
RUN apk add --no-cache $PHPIZE_DEPS postgresql-dev curl \
&& pecl install xdebug-2.7.2 redis \
&& docker-php-ext-enable xdebug redis\
&& docker-php-ext-install pdo_pgsql pcntl \
<scheme name="Visual Studio Dark copy" version="142">
<metaInfo>
<property name="created">2016-11-23T10:08:43</property>
<property name="ide">Rider</property>
<property name="ideVersion">1.0.0.0</property>
<property name="modified">2016-11-23T10:15:18</property>
<property name="originalScheme">Visual Studio Dark</property>
</metaInfo>
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="EDITOR_LIGATURES" value="true" />
@wgriffioen
wgriffioen / nieuwe manier.php
Created February 2, 2015 18:51
PHP - MySQL voorbeeld voor Vincent
<?php
/**
* Dit is de nieuwe manier. Zo kun je het beste gaan doen. PDO lijkt een beetje op db class uit ons CMS, maar dan
* nog net wat beter.
*/
$pdo = new \PDO('mysql:host=localhost;dbname=database', $username, $password);
// Zo haal je dan dingen op uit de database
$results = $pdo->query("SELECT * FROM users")->execute();
# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files
$(document).ready(function () {
setTimeout(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)
}
@wgriffioen
wgriffioen / gist:1673025
Created January 24, 2012 22:09
Twitter API voorbeeld met cache
<?php
define('TWITTER_USERNAME', 'dev10');
define('CACHE_FILE', dirname(__FILE__) . '/cache.txt');
if (!file_exists(CACHE_FILE) || filemtime(CACHE_FILE) < time() - 60 * 60) {
// Bestand bestaat niet of is te oud
// Als het te oud is verwijderen
if (file_exists(CACHE_FILE)) {
@wgriffioen
wgriffioen / gist:1672935
Created January 24, 2012 21:51
Twitter API voorbeeld
<?php
/**
* @constant TWITTER_USERNAME De gebruikersnaam waarvoor je de tweets wilt ophalen
*/
define('TWITTER_USERNAME', 'dev10');
/////////////////////////////////////////////////
/*
* Curl variant (beste manier)
@wgriffioen
wgriffioen / user-style.css
Created December 10, 2011 16:50
New Twitter even better
.content-main { float: left; }
.dashboard { float: right; }
<?php
class VATChecker {
const RESPONSE_TIMEOUT = 5;
const INVALID_COUNTRY_CODE = 1;
const INVALID_FORMAT = 2;
const UNABLE_TO_CHECK = 3;
const VALID_VAT_NUMBER = 4;