Skip to content

Instantly share code, notes, and snippets.

View abner's full-sized avatar

Ábner Silva de Oliveira abner

View GitHub Profile
@jkrems
jkrems / es-module-history.md
Last active March 16, 2025 13:43
History of ES modules

Modules - History & Future

History

@abner
abner / ArrayToSingleResult.java
Last active January 18, 2018 01:46
Java - From Array Observable into a Array mapped from multiple Single operations
import io.vertx.core.json.JsonArray;
import rx.Observable;
import rx.Single;
/**
* @author abner2
*/
public class RxPlayground {
public static void main(String[] args) {
@getify
getify / 1.md
Last active October 15, 2020 01:44
BetterPromise: a strawman experiment in subclassing Promise and "fixing" a bunch of its awkward/bad parts

Some things that are "better" with this BetterPromise implementation:

  • BetterPromise # then(..) accepts a BetterPromise (or Promise) instance passed directly, instead of requiring a function to return it, so that the promise is linked into the chain.

    var p = BetterPromise.resolve(42);
    
    var q = Promise.resolve(10);
    
    p.then(console.log).then(q).then(console.log);
@abner
abner / scp-with-compression.sh
Created February 19, 2019 19:43
Copy with SCP from remote server using compression
#!/bin/bash
ssh [email protected] "cd /home/abner/target-folder; tar zc data-bkp --verbose" | tar zx
<link rel="shortcut icon" width=32px>
<canvas style="display: none" id="loader" width="16" height="16"></canvas>
<script>
class Loader {
constructor(link, canvas) {
this.link = link;
this.canvas = canvas;
this.context = canvas.getContext('2d');
this.context.lineWidth = 2;
@oschannel
oschannel / CHEATSHEET.md
Last active August 5, 2025 09:32
Running PostgreSQL server on Android Phone without rooting

This cheatsheet is for the following video that shows how to Install and Run the PostgreSQL Database server on your Andriod Phone. Watch this video for a complete Demo/Solution: https://youtu.be/7edutr-ALdc

Install Termux:

Once termux is installed open it and use the shell for below commands

  • Install PostgreSQL: