Skip to content

Instantly share code, notes, and snippets.

@armandduijn
armandduijn / clear-doctrine-cache.php
Created February 8, 2020 12:32
Clear Doctrine cache when using APC
<?php
# Running `orm:clear-cache:metadata` may fail with an error about
# shared webserver memory. Upload this PHP script to a public
# folder on your webserver and access it via the web.
apc_clear_cache();
apc_clear_cache('user');
print("Done");
@armandduijn
armandduijn / Language.php
Created December 27, 2015 15:40
Class to convert a language to a 2-letter country code and vice versa
<?php
class Language {
/*
* Dictionary of languages with 2-letter country codes (adapted ISO 639-1)
* @var array
*/
protected static $dictionary = [
'Abkhaz' => 'AB',
@armandduijn
armandduijn / Gruntfile.js
Last active November 6, 2015 11:26
Grunt file to compile SASS on the fly
module.exports = function(grunt) {
grunt.initConfig({
// Project configuration
pkg: grunt.file.readJSON('package.json'),
// Compile Sass
sass: {
options: {
sourceMap: true,

Keybase proof

I hereby claim:

  • I am armandduijn on github.
  • I am armand (https://keybase.io/armand) on keybase.
  • I have a public key ASBFxbZ7vqz1MCCkG9c1J0RLjZD80WD1okJXzzn4KHKezAo

To claim this, I am signing this object: