Skip to content

Instantly share code, notes, and snippets.

View zerosign's full-sized avatar
🏠
Working from home

zerosign zerosign

🏠
Working from home
View GitHub Profile
class MyCellRenderer : Gtk.CellRenderer {
// icon property set by the tree column
public Gdk.Pixbuf icon { get; set; }
public string text { get; set; }
public int progress { get; set; }
public int Padding;
private Gtk.CellRendererPixbuf icon_renderer;
private Gtk.CellRendererText text_renderer;

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"

Next Steps

  • Measure time spend on index, flush, refresh, merge, query, etc. (TD - done)
  • Take hot threads snapshots under read+write, read-only, write-only (TD - done)
  • Adjust refresh time to 10s (from 1s) and see how load changes (TD)
  • Measure time of a rolling restart doing disable_flush and disable_recovery (TD)
  • Specify routing on query -- make it choose same node for each shard each time (MD)
  • GC new generation size (TD)
  • Warmers
  • measure before/after of client query time with and without warmers (MD)

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.

@zerosign
zerosign / tools.md
Last active August 29, 2015 14:25 — forked from nrc/tools.md
Rust tooling

Rust developer tools - status and strategy

Availability and quality of developer tools are an important factor in the success of a programming language. C/C++ has remained dominant in the systems space in part because of the huge number of tools tailored to these lanaguages. Succesful modern languages have had excellent tool support (Java in particular, Scala, Javascript, etc.). Finally, LLVM has been successful in part because it is much easier to extend than GCC. So far, Rust has done pretty well with developer tools, we have a compiler which produces good quality code in reasonable time, good support for debug symbols which lets us leverage C++/lanaguge agnostic tools such as debuggers, profilers, etc., there are also syntax highlighting, cross-reference, code completion, and documentation tools.

In this document I want to layout what Rust tools exist and where to find them, highlight opportunities for tool developement in the short and long term, and start a discussion about where to focus our time an

@zerosign
zerosign / 00.graphx.scala
Last active August 28, 2015 11:16 — forked from ceteri/00.graphx.scala
Spark GraphX demo
import org.apache.spark.graphx._
import org.apache.spark.rdd.RDD
case class Peep(name: String, age: Int)
val vertexArray = Array(
(1L, Peep("Kim", 23)),
(2L, Peep("Pat", 31)),
(3L, Peep("Chris", 52)),
(4L, Peep("Kelly", 39)),
@zerosign
zerosign / introrx.md
Last active September 6, 2015 02:57 — 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.

@zerosign
zerosign / playground.rs
Created October 8, 2015 10:51 — forked from anonymous/playground.rs
Shared via Rust Playground
pub mod monitor {
enum Context {
Minimal(host: String, app: String, version: String),
Compact(
host: String, app: String, version: String,
namespace: String
)
}
@zerosign
zerosign / fn_universal.cpp
Created January 3, 2016 04:12 — forked from VictorLaskin/fn_universal.cpp
Templates as first-class citizens in C++11
// Templates as first-class citizens in C++11
// Example code from http://vitiy.info/templates-as-first-class-citizens-in-cpp11/
// Written by Victor Laskin (victor.laskin@gmail.com)
#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <tuple>
@zerosign
zerosign / listcompr.cpp
Created January 3, 2016 04:14 — forked from VictorLaskin/listcompr.cpp
C++11: Implementation of list comprehension in SQL-like form
// List comprehension in C++11 in form of SQL-like syntax
// Example code from http://vitiy.info/cpp11-writing-list-comprehension-in-form-of-sql/
// Written by Victor Laskin (victor.laskin@gmail.com)
#include <iostream>
#include <functional>
#include <vector>
#include <future>
#include <algorithm>
using namespace std;