Skip to content

Instantly share code, notes, and snippets.

View gist:20561d3c49522eab2b689185b425e4ae
# download
# unzip and start
cd elasticsearch-0.20.4
# remove data in case you have defined some analyzers in the past (e.g. stop/start)
rm -rf data/
View Gemfile
source ''
gem 'gooddata'
gem 'json'
gem 'pmap'
View .travis.yml
language: node_js
- '0.10'
install: npm run dev_install
View traceroute.hs
#!/usr/bin/env runhaskell
-- Haskell traceroute over icmp
import Control.Monad
import Data.Bits(complement)
import Data.Char (chr,ord)
import Data.List
import Data.Monoid
import Data.Time
View ember.select2.js
// Select box utilizing Select2 functionality that overrides Ember.Select;
// Define view in the same way that you would an Ember.Select view.
// Additional attributes supported are: width, allowClear, and closeOnSelect;
// Example view:
// {{ view App.Select2
// viewName="fieldValueSelect2"
// prompt="Please select a value list"
// contentBinding="controller.fieldValuesLists"
// optionLabelPath=""
// optionValuePath=""
View nginx.conf
#don't send the nginx version number in error pages and Server header
server_tokens off;
# config to enable HSTS(HTTP Strict Transport Security)
# to avoid ssl stripping
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
# config to don't allow the browser to render the page inside an frame or iframe
# and avoid clickjacking
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri
View Gruntfile.js
module.exports = function(grunt) {
'use strict';
// Project configuration.
meta : {
// Specify where our test files are. Once we get all the tests switched over we can use 'test/js/**/*.spec.js' to automatically load all tests.
specs : ['test/js/src/**/*.spec.js'],
bin : {
coverage: 'js/bin/coverage'
korczis / pagination_support.js
Created Sep 25, 2012
View pagination_support.js
var get = Ember.get;
@extends Ember.Mixin
Implements common pagination management properties for controllers.
Ember.PaginationSupport = Ember.Mixin.create({
korczis / proxy.js
Created Mar 9, 2012 — forked from steadicat/proxy.js
A reverse-proxy for CouchDB written in Node.js
View proxy.js
var sys = require('sys');
var http = require('http');
var url = require('url');
var PREFIX = '/db/';
var TARGET = '';
var PORT = 8001;