Skip to content

Instantly share code, notes, and snippets.

View msangel's full-sized avatar
🕺
an ordinary human being

Vasyl Khrystyuk msangel

🕺
an ordinary human being
View GitHub Profile
@Geoyi
Geoyi / install virtualenv ubuntu 16.04.md
Created September 16, 2017 12:19 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@koesie10
koesie10 / ApiModule.java
Created October 3, 2015 07:40
Retrofit 1 error handling behaviour in Retrofit 2
// Dagger 1 example
@Module(
complete = false,
library = true
)
public final class ApiModule {
@Provides
@Singleton
Retrofit provideRetrofit(Gson gson, Application app) {
return new Retrofit.Builder()
@giwa
giwa / file0.txt
Last active December 6, 2023 07:36
Install g++/gcc 4.8.2 in CentOS 6.6 ref: http://qiita.com/giwa/items/28c754d8fc2936c0f6d2
$ wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /etc/yum.repos.d/devtools-2.repo
$ yum install devtoolset-2-gcc devtoolset-2-binutils
$ yum install devtoolset-2-gcc-c++ devtoolset-2-gcc-gfortran
@darcyparker
darcyparker / installAcer720CTouchPadDriver.sh
Last active March 20, 2020 01:08
Install ChromiumOS touchpad driver for linux chroot (crouton) on Acer C720C chromebook. This makes the touchpad behave and respond like it does in ChromeOS.
#!/usr/bin/env bash
#Install ChromiumOS touchpad driver for linux chroot (crouton) on Acer C720P (Peppy) Chromebook.
#This makes the touchpad behave and respond like it does in ChromeOS.
#See: https://github.com/hugegreenbug/xf86-input-cmt/issues/6
#I posted a note about this script in: https://groups.google.com/forum/#!topic/crouton-central/claM9XZxsz0
#and https://github.com/dnschneid/crouton/wiki/Acer-C720-C720P#touchpad
#After creating/installing this driver, look at:
#https://github.com/hugegreenbug/xf86-input-cmt#notes
@daschl
daschl / gist:db9fcc9d2b932115b679
Last active August 26, 2020 23:17
Draft: Writing Code for Production

Writing Resilient Reactive Applications

This guide is a first draft (that will end up in the official docs) on writing resilient code for production with the Couchbase Java SDK. At the end, the reader will be able to write code that withstands bugs, latency issues or anything else that can make their application fail.

Note that lots of concepts can be applied for both synchronous and asynchronous access. When necessary, both patterns are discussed separately. Also, the focus is on database interaction, but if you are using RxJava as part of your stack you can apply most of the principles there as well (and should!).

RxJava 101 Recap: Cold and Hot Observables

When working with Observables, it is important to understand the difference between cold and hot. Cold Observables will start to emit events once a Observer subscribes, and will do it "fresh" for each Observer. Hot Observables instead are starting to emit data as soon as it becomes available, and will return the same (or parts of the same)