Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| function ParsedUrl(url) { | |
| var parser = document.createElement("a"); | |
| parser.href = url; | |
| // IE 8 and 9 dont load the attributes "protocol" and "host" in case the source URL | |
| // is just a pathname, that is, "/example" and not "http://domain.com/example". | |
| parser.href = parser.href; | |
| // IE 7 and 6 wont load "protocol" and "host" even with the above workaround, | |
| // so we take the protocol/host from window.location and place them manually |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
| /* | |
| In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
| server, but for some reason omit a client connecting to it. I added an | |
| example at the bottom. | |
| Save the following server in example.js: | |
| */ | |
| var net = require('net'); |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| ################################################################## | |
| # /etc/elasticsearch/elasticsearch.yml | |
| # | |
| # Base configuration for a write heavy cluster | |
| # | |
| # Cluster / Node Basics | |
| cluster.name: logng | |
| # Node can have abritrary attributes we can use for routing |
| cd ~ | |
| sudo rm -Rf /usr/local/share/elasticsearch | |
| sudo /usr/local/share/elasticsearch/bin/service/elasticsearch remove | |
| sudo rm /usr/local/bin/rcelasticsearch | |
| wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.3.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz | |
| rm elasticsearch.tar.gz | |
| sudo mv elasticsearch-* elasticsearch | |
| sudo mv elasticsearch /usr/local/share |
| import httplib | |
| import base64 | |
| try: | |
| import json | |
| except ImportError: | |
| import simplejson as json | |
| config = {"username": "your-sauce-username", | |
| "access-key": "your-sauce-api-key"} |
| /* | |
| * Copyright (c) 2013 Calvin Rien | |
| * | |
| * Based on the JSON parser by Patrick van Bergen | |
| * http://techblog.procurios.nl/k/618/news/view/14605/14863/How-do-I-write-my-own-parser-for-JSON.html | |
| * | |
| * Simplified it so that it doesn't throw exceptions | |
| * and can be used in Unity iPhone with maximum code stripping. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining |