Skip to content

Instantly share code, notes, and snippets.

Emil Kilhage kilhage

Block or report user

Report or block kilhage

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
@kilhage
kilhage / nginx-gzip.conf
Created Dec 4, 2015
Enables gzip compression for common mime types in nginx
View nginx-gzip.conf
# most people include something like this. don't.
# check your default nginx.conf, it's already covered in a much better way.
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";
# compress proxied requests too.
# it doesn't actually matter if the request is proxied, we still want it compressed.
gzip_proxied any;
# a pretty comprehensive list of content mime types that we want to compress
# there's a lot of repetition here because different applications might use different
@kilhage
kilhage / apache-gzip.conf
Last active Nov 24, 2018
Enables gzip compression for common mime types in apache
View apache-gzip.conf
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/json
@kilhage
kilhage / en_us.phone_prefixes_list.php
Created Aug 28, 2012
SugarCrm - Phone prefixes Dropdown List
View en_us.phone_prefixes_list.php
<?php
$app_list_strings['phone_prefixes_list'] = array (
'' => '',
35818 => '+ 358 18',
45 => '+ 45',
298 => '+ 298',
35 => '+ 35',
299 => '+ 299',
354 => '+ 354',
@kilhage
kilhage / en_us.iso_country_code_phone_prefixes_list.php
Created Aug 28, 2012
SugarCrm - Iso Country Code To Phone Prefixes Conversion list
View en_us.iso_country_code_phone_prefixes_list.php
<?php
$app_list_strings['iso_country_code_phone_prefixes_list'] = array (
'' => '',
'AX' => 35818,
'DK' => 45,
'FO' => 298,
'FI' => 35,
'GL' => 299,
'IS' => 354,
@kilhage
kilhage / en_us. iso_3166_1_country_code_list.php
Last active Oct 9, 2015
SugarCrm - Iso 3166-1 Country Code Dropdown List
View en_us. iso_3166_1_country_code_list.php
<?php
/**
* @author Emil Kilhage <emilkilhage@gmail.com>
*/
$app_list_strings['iso_3166_1_country_code_list'] = array (
"SE" => "Sweden",
"FI" => "Finland",
"NO" => "Norway",
"DK" => "Denmark",
View jQuery.clock.js
jQuery.fn.clock = (function () {
"use strict";
return function () {
return this.each(function (i, element) {
var d = 0, h = 0, m = 0, s = 0,
date = jQuery.trim(element.innerHTML), sd;
function update() {
var time = "";
if (d > 0) {
We couldn’t find that file to show.
You can’t perform that action at this time.