Skip to content

Instantly share code, notes, and snippets.

View krebernisak's full-sized avatar
🎯
Focusing

Kristijan Rebernisak krebernisak

🎯
Focusing
View GitHub Profile
@krebernisak
krebernisak / system-design-cheat-sheat.md
Created April 30, 2020 18:38
System design cheat sheet - It can be used for interviews or assessments (forked from Nikolay Ashanin)

System design cheat sheet

It can be used for interviews or assessments.

1. Understand problem and scope:

  • Recognize stakeholders and prioritize them. Create RACI matrix
  • Understand business drivers of the project
  • Recognize end-users of the project and understand how they will use that system
  • Check functional requirements
  • Define external dependencies
  • Suggest additional features
  • Remove items that interviewer considers out of scope

Keybase proof

I hereby claim:

  • I am krebernisak on github.
  • I am krebernisak (https://keybase.io/krebernisak) on keybase.
  • I have a public key ASDRGM-oIfTk6c3fZu7r8r3yiQjEcnItSd4ebc5M1_43Ego

To claim this, I am signing this object:

@krebernisak
krebernisak / es_scrollable
Created January 11, 2018 18:21
ES Scrollable API exercise
// es connection
class Client {
Call create(Query q);
}
// immutable call object created for specific client an query
class Call {
Result execute();
ScrollableCall toScrollable(long ttl); // this call makes a network request to get the first scrollable token
@krebernisak
krebernisak / RxFirebase.java
Last active November 23, 2015 11:05 — forked from gsoltis/RxFirebase.java
RxJava Bindings for Firebase
package com.firebase.client;
import com.firebase.client.AuthData;
import com.firebase.client.ChildEventListener;
import com.firebase.client.DataSnapshot;
import com.firebase.client.Firebase;
import com.firebase.client.FirebaseError;
import com.firebase.client.Query;
import com.firebase.client.ValueEventListener;
import com.firebase.client.core.view.Event;
{ chart: { backgroundColor: 'transparent' },
credits: { enabled: false },
title: { style: { color: '#fff' }, text: 'Content Import SE' },
xAxis: [ { type: 'datetime', tickInterval: 1209600000 } ],
yAxis:
[ { title: { text: 'Time' }, min: 0 },
{ gridLineWidth: 0,
title: { text: 'Total', style: { color: '#72919A' } },
labels: { format: '{value}%', style: { color: '#72919A' } },
min: 0,
@krebernisak
krebernisak / argv.py
Created November 11, 2013 19:11
Python argument list manipulation
#!/usr/bin/env python
import sys
# Get the total number of args passed to the demo.py
total = len(sys.argv)
# Get the arguments list
cmdargs = str(sys.argv)
@krebernisak
krebernisak / open_file.py
Created November 11, 2013 19:08
Open file and readlines
with open(fname) as f:
content = f.readlines()
function youtube_parser(url) {
var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
var match = url.match(regExp);
if (match && match[7].length === 11) {
return match[7];
} else {
alert("Url incorrecta");
}
}
@krebernisak
krebernisak / APK debugging
Created September 25, 2013 13:35
Get the packaged app config info
aapt dump badging <my_apk.apk>
@krebernisak
krebernisak / gut daemon
Created September 25, 2013 10:07
Start a git daemon
git daemon --reuseaddr --base-path=. --export-all --verbose
git clone git://[ip_addr]/ dir