Skip to content

Instantly share code, notes, and snippets.

#!/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
@korczis
korczis / .travis.yml
Last active August 29, 2015 14:23 — forked from tomchentw/.travis.yml
language: node_js
node_js:
- '0.10'
install: npm run dev_install
env:
global:
secure: CODECLIMATE_TOKEN
source 'https://rubygems.org'
gem 'gooddata'
gem 'json'
gem 'pmap'
@korczis
korczis / pagination_support.js
Created September 25, 2012 19:49
Ember.PaginationSupport
var get = Ember.get;
/**
@extends Ember.Mixin
Implements common pagination management properties for controllers.
*/
Ember.PaginationSupport = Ember.Mixin.create({
/**
*/
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
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
korczis / nginx.conf
Created September 28, 2013 04:46 — forked from plentz/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) https://developer.mozilla.org/en-US/docs/Security/HTTP_Strict_Transport_Security
# to avoid ssl stripping https://en.wikipedia.org/wiki/SSL_stripping#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 http://en.wikipedia.org/wiki/Clickjacking
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri
// 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="content.name"
// optionValuePath="content.id"
@korczis
korczis / gist:20561d3c49522eab2b689185b425e4ae
Created August 30, 2016 09:37 — forked from lukas-vlcek/gist:4673027
Čeština v elasticsearch
#!/bin/sh
# download
wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.4.zip
# unzip and start
unzip elasticsearch-0.20.4.zip
cd elasticsearch-0.20.4
# remove data in case you have defined some analyzers in the past (e.g. stop/start)
rm -rf data/
@korczis
korczis / proxy.js
Created March 9, 2012 20:02 — forked from steadicat/proxy.js
A reverse-proxy for CouchDB written in Node.js
#!/usr/local/bin/node
var sys = require('sys');
var http = require('http');
var url = require('url');
var PREFIX = '/db/';
var TARGET = 'http://example.cloudant.com';
var PORT = 8001;