Skip to content

Instantly share code, notes, and snippets.

View kilhage's full-sized avatar
🚀

Emil Kilhage kilhage

🚀
View GitHub Profile
@kilhage
kilhage / jQuery.clock.js
Created June 22, 2011 22:16
jQuery.clock
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) {
@kilhage
kilhage / en_us. iso_3166_1_country_code_list.php
Last active October 9, 2015 00:58
SugarCrm - Iso 3166-1 Country Code Dropdown List
<?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",
@kilhage
kilhage / en_us.phone_prefixes_list.php
Created August 28, 2012 19:04
SugarCrm - Phone prefixes Dropdown List
<?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 August 28, 2012 19:06
SugarCrm - Iso Country Code To Phone Prefixes Conversion list
<?php
$app_list_strings['iso_country_code_phone_prefixes_list'] = array (
'' => '',
'AX' => 35818,
'DK' => 45,
'FO' => 298,
'FI' => 35,
'GL' => 299,
'IS' => 354,
We couldn’t find that file to show.
@kilhage
kilhage / apache-gzip.conf
Last active November 24, 2018 00:40
Enables gzip compression for common mime types in apache
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 / nginx-gzip.conf
Created December 4, 2015 11:07
Enables gzip compression for common mime types in nginx
# 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