Skip to content

Instantly share code, notes, and snippets.

@piatra
piatra / kafka_start.sh
Last active May 24, 2024 17:04
start zookeeper and kafka in the background and create a topic
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Please supply topic name"
exit 1
fi
nohup bin/zookeeper-server-start.sh -daemon config/zookeeper.properties > /dev/null 2>&1 &
sleep 2
nohup bin/kafka-server-start.sh -daemon config/server.properties > /dev/null 2>&1 &
@piatra
piatra / gist:4e82de4cf9158d73ec49
Created December 10, 2014 13:48
ubuntu 13.04 sources.list
deb http://www.mirrorservice.org/sites/packages.linuxmint.com/packages/ olivia main upstream import
deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ raring-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ raring partner
@piatra
piatra / script.js
Created August 24, 2014 20:19
[Backbone router] Child route to trigger parent route action as well
(function() {
"use strict";
var MyRouter = Backbone.Router.extend({
routes: {
"/" : "home",
"user/:username" : "profilePage",
"user/:username/following": "following",
"user/:username/followers": "followers"
},
@piatra
piatra / plugins
Last active August 29, 2015 14:04
vim setup
YouCompleteMe
Zenburn
ctrlp.vim
detectindent
easybuffer.vim
nerdcommenter
nerdtree
python-mode
rust.vim
syntastic
@piatra
piatra / .vimrc
Last active July 14, 2016 00:23
execute pathogen#infect()
let g:pathogen_disabled = []
if has("gui")
" You complete me ! <3
let g:ycm_global_ycm_extra_conf = "~/.vim/.ycm_extra_conf.py"
nnoremap <leader>g :YcmCompleter GoToDefinitionElseDeclaration<CR>
let g:ycm_show_diagnostics_ui=0
" colorscheme
@piatra
piatra / peerjsdemo.html
Created April 12, 2014 09:08
peer js demo
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<button>connect</button>
<script src="http://cdn.peerjs.com/0.3/peer.js"></script>
@piatra
piatra / index.html
Created February 26, 2014 22:27
getUserMedia in Firefox OS 1.4
<!DOCTYPE html>
<html>
<head>
<title>getUserMedia - Demo</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>getUserMedia - Demo</h1>
<video autoplay></video>
<button id="capture">Capture</button>
@piatra
piatra / project.clj
Created December 8, 2013 00:10
Example configuration file for a CLJS Node project.
(defproject node "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-1978"]]
:plugins [[lein-cljsbuild "0.3.4"]]
:cljsbuild {
@piatra
piatra / index.html
Last active December 29, 2015 03:59
Demo for working with the chrome dev tools
<html>
<head>
<title>
My webpage
</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Real time web apps</h1>
</body>
@piatra
piatra / gist:7168698
Last active December 26, 2015 14:49
Useful
### adb libraries missing in Ubuntu
* apt-get install lib32ncurses5 lib32stdc++6
### Installing mercurial
sudo apt-get install python-setuptools python-dev build-essential
sudo easy_install -U mercurial
* https://developer.mozilla.org/en/docs/Installing_Mercurial