Skip to content

Instantly share code, notes, and snippets.

View bzick's full-sized avatar
🤔
hmmm

Ivan Shalganov bzick

🤔
hmmm
View GitHub Profile
@bzick
bzick / query-parser.js
Last active February 22, 2016 10:42
Query parser
function parseQuery() {
    var params = {};
    var query = window.location.search.substring(1);
    var vars = query.split("&");
    for (var i = 0; i < vars.length; i++) {
        var pair = vars[i].split("=");
if(params[pair[0]] === undefined) {
params[pair[0]] = [decodeURIComponent(pair[1])];
} else {
params[pair[0]].push(decodeURIComponent(pair[1]));
@bzick
bzick / gist:5046482
Created February 27, 2013 09:05
PHP Mac port /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/php5/Portfile
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 101787 2013-01-19 11:09:51Z ryandesign@macports.org $
PortSystem 1.0
name php5
conflicts php5-devel php52
# Keep version of php5 in sync with bundled php5 extension ports.
# Increment revision of php5-eaccelerator when updating version of php5.
epoch 1