bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
... | |
{% block css %} | |
... | |
{% if not debug %} | |
<!-- Currently, the css is included as part of javascript in development--> | |
<!-- This includes the built css for production (I am currently using Grunt for this) --> | |
<!-- If ExtractTextPlugin is configured properly, Webpack can handle separate css in development and production --> |
// TypeScript Fundamentals For JavaScript Developers | |
/* | |
Tutorial for JavaScript Developers wanting to get started with TypeScript. | |
Thorough walkthrough of all the basic features. | |
We will go through the basic features to gain a better understanding of the fundamentals. | |
You can uncomment the features one by one and work through this tutorial. | |
If you have any questions or feedback please connect via Twitter: | |
A. Sharif : https://twitter.com/sharifsbeat | |
*/ |
class MyView(CreateView): | |
model = Team | |
def form_valid(self, form): | |
self.object = form.save(commit=False) | |
self.object.user = self.request.user | |
self.object.save() | |
return FormMixin.form_valid(self, form) |
#!/usr/bin/python | |
import subprocess | |
import os | |
import sys | |
#res = subprocess.Popen(['ls','-al','/ahome'],stdout=subprocess.PIPE,stderr=subprocess.PIPE); | |
#output,error = res.communicate() | |
#if res.returncode: | |
# #raise Exception(error) |
#!/usr/bin/env python | |
""" | |
mocking requests calls | |
""" | |
import mock | |
import unittest | |
import requests | |
from requests.exceptions import HTTPError |
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () { | |
var Storage = function (type) { | |
function createCookie(name, value, days) { | |
var date, expires; | |
if (days) { | |
date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
expires = "; expires="+date.toGMTString(); |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
function fromEvent(dom, eventName) { | |
return { | |
forEach: function(observer) { | |
var handler = (e) => { | |
observer.onNext(e); | |
}; | |
dom.addEventListener(eventName, handler); | |
// Subscription | |
return { |