Skip to content

Instantly share code, notes, and snippets.

@zouzias
zouzias / setup.py
Created October 4, 2017 19:57 — forked from hryk/setup.py
an example for using boost::unordered_map in Cython.
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
ext_modules = [
Extension("test_um",
["test_um.pyx"],
include_dirs=["/usr/local/include/boost"],
library_dirs=["/usr/local/lib"],
language="c++")
@zouzias
zouzias / tmux-cheatsheet.markdown
Created June 12, 2017 11:15 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@zouzias
zouzias / nginxproxy.md
Created November 7, 2016 23:29 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

Originally:
https://gist.github.com/7565976a89d5da1511ce
Hi Donald (and Martin),
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I
appreciate the tone. This is a Yegge-long response, but given that you and
Martin are the two people best-situated to do anything about this, I'd rather
err on the side of giving you too much to think about. I realize I'm being very
critical of something in which you've invested a great deal (both financially
<!-- for udp -->
<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashSocketAppender">
<host>logstash_server/host>
<port>logstash_port</port>
<encoder class="net.logstash.logback.encoder.LogstashEncoder" />
</appender>
<!-- for tcp -->
<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
<host>logstash_server/host>
@zouzias
zouzias / bamboo-to-slack.py
Created June 24, 2016 11:58 — forked from remmelt/bamboo-to-slack.py
Post an Atlassian Bamboo build result to Slack
#!/usr/bin/python
"""
Create a stage in your project, make it the last stage.
Make a task in the stage with this inline script:
#! /bin/bash
/some/path/bamboo-to-slack.py "${bamboo.planKey}" "${bamboo.buildPlanName}" "${bamboo.buildResultsUrl}"
@zouzias
zouzias / a:Oozie Example: Hive Actions
Created January 9, 2016 11:30 — forked from tmusabbir/a:Oozie Example: Hive Actions
Oozie Example: Hive Actions
Oozie Example: Hive Actions
@zouzias
zouzias / README.md
Created December 23, 2015 17:10 — forked from micjamking/README.md
[JavaScript] Deploying Yeoman apps to Heroku | https://medium.com/console-log-yo/launching-apps-with-yeoman-1d0dfa627305

Deploying Yeoman apps to Heroku

Prerequisites

This assumes you already have a Yeoman app and are ready for publishing

Build for Production

Create production directory & assets

@zouzias
zouzias / AliceInAggregatorLand.scala
Created November 11, 2015 17:36 — forked from johnynek/AliceInAggregatorLand.scala
A REPL Example of using Aggregators in scala
/**
* To get started:
* git clone https://github.com/twitter/algebird
* cd algebird
* ./sbt algebird-core/console
*/
/**
* Let's get some data. Here is Alice in Wonderland, line by line
*/
@zouzias
zouzias / introrx.md
Created September 28, 2015 19:08 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called Reactive Programming, particularly its variant comprising of Rx, Bacon.js, RAC, and others.

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.