Skip to content

Instantly share code, notes, and snippets.

View jimaek's full-sized avatar
💭
Working as always

Dmitriy Akulov jimaek

💭
Working as always
View GitHub Profile
@jimaek
jimaek / gist:5881006
Created June 27, 2013 22:34
jsDelivr gather performance and uptime data
<script type="text/javascript">
(function(w, d) { var a = function() { var a = d.createElement('script'); a.type = 'text/javascript';
a.async = 'async'; a.src = '//' + ((w.location.protocol === 'https:') ? 's3.amazonaws.com/cdx-radar/' :
'radar.cedexis.com/') + '01-11475-radar10.min.js'; d.body.appendChild(a); };
if (w.addEventListener) { w.addEventListener('load', a, false); }
else if (w.attachEvent) { w.attachEvent('onload', a); }
}(window, document));
</script>
@jimaek
jimaek / gist:6221026
Created August 13, 2013 13:24
SAM Ribbon Stylesheet
<link rel="stylesheet" href="http://speedawarenessmonth.wpengine.netdna-cdn.com/files/gh-fork-ribbon.css" />
<!-- TOP RIGHT RIBBON: START COPYING HERE -->
<div class="github-fork-ribbon-wrapper right">
<div class="github-fork-ribbon">
<a href="http://www.speedawarenessmonth.com/">#SAM2013 Sponsor</a>
</div>
</div>
<!-- TOP RIGHT RIBBON: END COPYING HERE -->
<!-- TOP LEFT RIBBON: START COPYING HERE -->
<div class="github-fork-ribbon-wrapper left">
proxy_cache_path /var/cache/nginx levels=2 keys_zone=my_diskcached:50m inactive=365d max_size=7g;
server {
listen 80;
server_name cdn.jsdelivr.net HOSTNAME.jsdelivr.net;
location / {
access_log off;
gzip on;
gzip_min_length 100;
gzip_types text/plain text/xml application/xml text/css text/javascript application/javascript application/x-javascript text/x-component application/json application/xhtml+xml application/rss+xml application/atom+xml application/vnd.ms-fontobject image/svg+xml application/x-font-ttf font/opentype;
unlink /etc/munin/plugins/entropy
unlink /etc/munin/plugins/forks
unlink /etc/munin/plugins/interrupts
unlink /etc/munin/plugins/irqstats
unlink /etc/munin/plugins/if_err_eth0
unlink /etc/munin/plugins/postfix_mailqueue
unlink /etc/munin/plugins/postfix_mailvolume
unlink /etc/munin/plugins/sendmail_mailqueue
unlink /etc/munin/plugins/sendmail_mailstats
unlink /etc/munin/plugins/sendmail_mailtraffic
<script type="text/javascript">
(function(w, d) { var a = function() { var a = d.createElement('script'); a.type = 'text/javascript';
a.async = 'async'; a.src = '//' + ((w.location.protocol === 'https:') ? 's3.amazonaws.com/cdx-radar/' :
'radar.cedexis.com/') + '01-11475-radar10.min.js'; d.body.appendChild(a); };
if (w.addEventListener) { w.addEventListener('load', a, false); }
else if (w.attachEvent) { w.attachEvent('onload', a); }
}(window, document));
</script>
@jimaek
jimaek / gist:ebea14a6215ab17ec4df
Created May 27, 2014 22:04
Open source CDN looking for contributors

Hey guys, I run the project jsDelivr which is a free open source CDN for developers.

The main feature of it is availability and performance. We operate a big system that offers as much availability as possible utilizing smart multi-CDN routing.

You can read about it in our repo https://github.com/jsdelivr/jsdelivr and on Mozilla Blog https://hacks.mozilla.org/2014/03/jsdelivr-the-advanced-open-source-public-cdn/

Its been 2 years since the project launched and today we have a small team of active contributors that help out with different components of the project.

We are also sponsored by companies such as MaxCDN, CloudFlare, Cedexis, Leapswitch, Prometeus and ExpertVM.

@jimaek
jimaek / gist:c0ff8ea084672dd43926
Created April 2, 2015 11:31
Install Python 2.7 on CentOS 6.5 to run cedexis.radar for jsDelivr
yum install gcc zlib-devel bzip2-devel openssl-devel xz-libs xz -y
wget http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz
xz -d Python-2.7.8.tar.xz
tar -xvf Python-2.7.8.tar
cd Python-2.7.8
./configure --prefix=/usr/local
make
make altinstall
curl https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py | python2.7 -
pip2.7 install cedexis.radar
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# pidfile: /var/run/nginx.pid
@jimaek
jimaek / gist:db774ad134dceed094a6
Created May 24, 2015 13:03
Compile Nginx with Pagespeed module on Centos 6.5
yum update
yum install wget -y
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm
yum install gcc-c++ pcre-dev pcre-devel zlib-devel make unzip vim openssl-devel
cd ~
NPS_VERSION=1.9.32.3
wget https://github.com/pagespeed/ngx_pagespeed/archive/release-${NPS_VERSION}-beta.zip
unzip release-${NPS_VERSION}-beta.zip
cd ngx_pagespeed-release-${NPS_VERSION}-beta/