Skip to content

Instantly share code, notes, and snippets.

@korczis
korczis / gulpfile.js
Created December 29, 2014 19:34
Ember Compiler
#! /usr/bin/env node
// Copyright, 2013-2014, by Tomas Korcak. <korczis@gmail.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
// furnished to do so, subject to the following conditions:
@korczis
korczis / README.md
Last active August 29, 2015 14:08
Prepare ubuntu based box for http://github.com/korczis/apollon instalation

Apollon Bootstrap Script

Prerequisites

  • bash
  • curl

Getting started

curl

csv2psql CLI examples

Enjoy them

List

  • Census 2010 as table
  • Census 2010 as SQL
  • CIA Factbook as table
  • CIA Factbook as SQL
time ./bin/csv2psql analyze --format=table data/cia-data-all.csv
+------------------------------------------------------------------+--------+-----------+---------+------+--------+------+
| data/cia-data-all.csv |
+------------------------------------------------------------------+--------+-----------+---------+------+--------+------+
| column | Bigint | Character | Decimal | Null | String | Uuid |
+------------------------------------------------------------------+--------+-----------+---------+------+--------+------+
| id | 0 | 0 | 0 | 0 | 261 | 0 |
| Labor force | 222 | 0 | 0 | 39 | 222 | 0 |
| Labor force details | 66 | 0 | 0
@korczis
korczis / boost_spritit_csv_parser.cpp
Created September 1, 2014 04:10
How to parse CVS using C++ boost::spirit
// See http://stackoverflow.com/questions/18365463/how-to-parse-csv-using-boostspirit
#include <boost/tokenizer.hpp>
#include <boost/spirit/include/qi.hpp>
namespace qi = boost::spirit::qi;
int main() {
const std::string s = R"(1997,Ford,E350,"ac, abs, moon",""rusty"",3000.00)";
[
{
"text": "Pavla Lopatková"
},
{
"text": "John Yungclas"
},
{
"text": "Alena Vlnasová"
},
@korczis
korczis / HOWTO.md
Last active August 29, 2015 14:05
PostGIS Cheat Sheet

How To

Enable PostGIS Extensions

For more information se official postgis site

-- Enable PostGIS (includes raster)
CREATE EXTENSION postgis;
# Hey Emacs, this is a -*- makefile -*-
#----------------------------------------------------------------------------
# WinAVR Makefile Template written by Eric B. Weddington, Jˆrg Wunsch, et al.
#
# Released to the Public Domain
#
# Additional material for this makefile was written by:
# Peter Fleury
# Tim Henigan
# Colin O'Flynn
tomaskorcak@kx-mac gooddata-ruby (rest-merge) $ rake notes
lib/gooddata/cli/commands/process_cmd.rb:
* [ 81] [TODO] Add params. HOW?
lib/gooddata/cli/commands/project_cmd.rb:
* [ 23] [TODO] Move away the ask methods. Provide params
lib/gooddata/commands/datasets.rb:
* [ 22] [TODO] Review following connect replacement/reimplementation
* [ 65] [TODO] Review following connect replacement/reimplementation
tomaskorcak@kx-mac ~ $ sudo tcpdump -nettti en3 -v icmp
tcpdump: listening on en3, link-type EN10MB (Ethernet), capture size 65535 bytes
00:00:00.000000 ac:7f:3e:e5:de:65 > 44:32:c8:cb:af:4f, ethertype IPv4 (0x0800), length 190: (tos 0x0, ttl 255, id 42817, offset 0, flags [none], proto ICMP (1), length 48)
10.0.0.17 > 91.213.160.118: ICMP echo request, id 55724, seq 61754, length 28
00:00:00.183324 44:32:c8:cb:af:4f > ac:7f:3e:e5:de:65, ethertype IPv4 (0x0800), length 64: (tos 0x20, ttl 49, id 56301, offset 0, flags [none], proto ICMP (1), length 48)
91.213.160.118 > 10.0.0.17: ICMP echo reply, id 55724, seq 61754, length 28
00:00:01.817743 ac:7f:3e:e5:de:65 > 44:32:c8:cb:af:4f, ethertype IPv4 (0x0800), length 190: (tos 0x0, ttl 255, id 42817, offset 0, flags [none], proto ICMP (1), length 48)
10.0.0.17 > 91.213.160.118: ICMP echo request, id 55724, seq 61754, length 28
00:00:00.183441 44:32:c8:cb:af:4f > ac:7f:3e:e5:de:65, ethertype IPv4 (0x0800), length 64: (tos 0x20, ttl 49, id 56302, offset 0