Skip to content

Instantly share code, notes, and snippets.

Thijs Feryn ThijsFeryn

Block or report user

Report or block ThijsFeryn

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
View symfony http & twig
{
"require": {
"symfony/http-foundation": "2.5.3",
"symfony/http-kernel": "2.5.3",
"twig/twig": "1.16.0"
}
}
@ThijsFeryn
ThijsFeryn / joindin_location_count.go
Created Jun 15, 2015
Pass the JoindIn speaker id to this program and it will count the amount of talks given at each location
View joindin_location_count.go
package main
import (
"strconv"
"io/ioutil"
"log"
"net/http"
"fmt"
"encoding/json"
"time"
@ThijsFeryn
ThijsFeryn / gist:b6ae0b6f7ea9b3eda9a1
Created Jul 14, 2015
Deflate for old & new versions of Apache
View gist:b6ae0b6f7ea9b3eda9a1
<IfModule filter_module>
<IfVersion >= 2.4>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} =~ m|^text/html|"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} =~ m|^text/html|"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} =~ m|^text/css|"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} =~ m|^text/plain|"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} =~ m|^text/xml|"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} =~ m|^text/x-component|"
FilterProvider COMPRESS DEFLATE "%{CONTENT_TYPE} =~ m|^application/javascript|"
@ThijsFeryn
ThijsFeryn / Magento APC cache
Created Jun 22, 2012
Configuring Magento APC cache backend in local.xml
View Magento APC cache
<global>
...
<cache>
<backend>apc</backend>
<prefix>MAGE_</prefix>
</cache>
...
</global>
@ThijsFeryn
ThijsFeryn / Magento Memcached cache
Created Jun 22, 2012
Configuring Magento Memcached cache backend in local.xml
View Magento Memcached cache
<global>
...
<cache>
<backend>memcached</backend>
<memcached>
<servers>
<server>
<host><![CDATA[127.0.0.1]]></host>
<port><![CDATA[11211]]></port>
<persistent><![CDATA[1]]></persistent>
View Magento APC settings
apc.max_file_size = 10M
apc.shm_size = 128M
@ThijsFeryn
ThijsFeryn / PHP command line arguments
Created Jun 26, 2012
Working with arguments in PHP on the command line
View PHP command line arguments
$ php cli.php arg1 arg2
@ThijsFeryn
ThijsFeryn / gist:2994304
Created Jun 26, 2012
Working with arguments in PHP on the command line
View gist:2994304
<?php
echo "There are {$argc} passed: ".PHP_EOL;
foreach($argv as $k=>$v){
echo "Argument {$k}: {$v}".PHP_EOL;
}
@ThijsFeryn
ThijsFeryn / gist:2994370
Created Jun 26, 2012
Working with I/O streams in PHP
View gist:2994370
$ php test.php < test.txt
You can’t perform that action at this time.