Skip to content

Instantly share code, notes, and snippets.

@zannet
zannet / index.html
Created May 28, 2017 05:03 — forked from bunkat/index.html
Swimlane Chart using d3.js
<!--
The MIT License (MIT)
Copyright (c) 2013 bill@bunkat.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@zannet
zannet / main.go
Created July 8, 2016 03:39 — forked from ynil/main.go
tiny ajax long polling chat server in go
// chatserver project main.go
package main
import (
"encoding/json"
"flag"
"fmt"
"github.com/golang/glog"
"github.com/zenazn/goji"
"github.com/zenazn/goji/web"
@zannet
zannet / guess.go
Created May 8, 2016 16:14 — forked from akhenakh/guess.go
Guess an image format in Golang
package main
import (
"image"
_ "image/gif"
_ "image/jpeg"
_ "image/png"
"io"
"mime"
@zannet
zannet / selection.js
Created May 8, 2016 14:13 — forked from visnup/selection.js
IE8 equivalent of HTML5/W3C Range object's startContainer,startOffset,endContainer and endOffset properties
(function selectionPolyfill(window, document) {
if (window.getSelection || !document.selection) return;
// convert an IE TextRange to a W3C one
function convert(range, startOrEnd) {
var point = range.duplicate()
, result = {};
// point is either the start or end of the range
point.collapse(startOrEnd);
@zannet
zannet / multipart_upload.go
Created May 6, 2016 08:18 — forked from mattetti/multipart_upload.go
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"
@zannet
zannet / nginx.default.conf
Created March 1, 2016 10:45 — forked from santoshachari/nginx.default.conf
PHP5.6 and NGINX: Install PHP56-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and php56-FPM
sudo yum install -y nginx php56-fpm
# Install php56 extensions
sudo yum install -y php56-devel php-mysql php56-pdo php56-pear php56-mbstring php56-cli php56-odbc php56-imap php56-gd php56-xml php56-soap