Skip to content

Instantly share code, notes, and snippets.

View necenzurat's full-sized avatar
🥺
I still hate JS

Costin Moise necenzurat

🥺
I still hate JS
View GitHub Profile

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

sudo su -
# stuff we need to build from source
apt-get install libpcre3-dev build-essential libssl-dev
# get the nginx source
cd /opt/
wget http://nginx.org/download/nginx-0.8.54.tar.gz
tar -zxvf nginx*
# we'll put the source for nginx modules in here
$('body').on('click', 'a, img, button', function(e) {
var $el = $(e.target);
if($el.data('event-count')) {
$el.data('event-count', ($el.data('event-count') + 1));
} else {
$el.data('event-count', 1);
}
var category = e.target.nodeName;
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov anton.al.ivanov@gmail.com 2012
(function(host) {
function Crawler() {
this.visitedURLs = {};
};
Crawler.webpage = require('webpage');
@necenzurat
necenzurat / google_translate.py
Created September 27, 2012 05:55 — forked from jugyo/google_translate.py
Sublime Google Translate Plugin
# Preferences.sublime-settings
#
# {
# ...
# "google_translate_mode": "en>ja",
# "google_translate_api_key": "API-KEY"
# }
#
# Default.sublime-keymap
#
@necenzurat
necenzurat / .gitignore
Created April 5, 2012 17:15 — forked from SaltwaterC/.gitignore
php cache curl
/cache/
@necenzurat
necenzurat / gist:2312544
Created April 5, 2012 17:04 — forked from anonymous/gist:2309745
Track Client-Side Errors with Google Analytics
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12345678-1']);
_gaq.push(['_setDomainName', 'yoursite.com']);
_gaq.push(['_addIgnoredRef', 'yoursite.com']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
@necenzurat
necenzurat / .gitignore
Created March 27, 2012 20:31 — forked from SaltwaterC/.gitignore
php cache curl
/cache/
@necenzurat
necenzurat / dloader.php
Created December 27, 2011 14:31 — forked from mihneawalker/dloader.php
downloader
<?php
$fsource = fopen('x.txt','r');
function save_image($img,$fullpath){
$ch = curl_init ($img);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
$rawdata=curl_exec($ch);
curl_close ($ch);
@necenzurat
necenzurat / miniuploader.html
Created August 26, 2011 17:55 — forked from andreaseger/miniuploader.html
a very compact drag and drop image uploader written in html5 an javascript
<!DOCTYPE html>
<!-- This is the shortest Image Uploader ever :)
And you can even make it shorter if you don't
want all the drag'n drop thing. -->
<!--
AUTHOR: @paulrouget <paul@mozilla.com>
LICENSE: