Skip to content

Instantly share code, notes, and snippets.

View lykmapipo's full-sized avatar

lally elias lykmapipo

View GitHub Profile
@lykmapipo
lykmapipo / supervisor.conf
Created February 3, 2018 12:36 — forked from tsabat/supervisor.conf
Sample supervisor config file
; Sample supervisor config file.
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; sockef file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
;[inet_http_server] ; inet (TCP) server disabled by default
@lykmapipo
lykmapipo / ultimate-ut-cheat-sheet.md
Created January 30, 2018 13:17 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@lykmapipo
lykmapipo / stream-file-upload-s3-nodejs.js
Created December 28, 2017 09:17 — forked from schempy/stream-file-upload-s3-nodejs.js
Streaming File Uploads To Amazon S3 With Node.js
var http = require('http');
var router = require('routes')();
var Busboy = require('busboy');
var AWS = require('aws-sdk');
var inspect = require('util').inspect;
var port = 5000;
// Define s3-upload-stream with S3 credentials.
var s3Stream = require('s3-upload-stream')(new AWS.S3({
accessKeyId: '',
@lykmapipo
lykmapipo / KeyboardUtils.java
Created December 1, 2017 12:00 — forked from marteinn/KeyboardUtils.java
Android utils class for showing and hiding a keyboard.
package se.marteinn.utils;
import android.content.Context;
import android.os.AsyncTask;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
/**
* Created by martinsandstrom on 2014-04-21.
@lykmapipo
lykmapipo / RxJava.md
Created November 30, 2017 22:28 — forked from ZacSweers/RxJava.md
Party tricks with RxJava, RxAndroid & Retrolambda

View Click

Instead of the verbose setOnClickListener:

RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));

Filter even numbers

Observable
    .just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
@lykmapipo
lykmapipo / setup.md
Last active July 12, 2017 11:59
Setup Custom MongoDB in Travis CI
language: node_js

node_js:
  - "4.0"
  - "4"
  - "5.0"
  - "5"
  - "6.0"
 - "6"
@lykmapipo
lykmapipo / mongodb_one_to_many_lookup.md
Last active June 22, 2016 10:09
A Sample MongoDB $lookup to populate many $ref
db.parties.aggregate(
  [
    {
      $match:{
        "roles":{
            $ne:null // []
          }
        }
 },
@lykmapipo
lykmapipo / mongodb_one_to_one_lookup.md
Last active June 22, 2016 10:07
A sample use of MongoDB $lookup to populate single $ref
db.entitlements.aggregate(
  [
    {
      $lookup:{
        from:"customers", 
        localField:"customer",
        foreignField:"_id", 
        as:"customer"
 }