Skip to content

Instantly share code, notes, and snippets.

@rondymesquita
rondymesquita / PasswordGenerator.java
Last active February 2, 2017 12:16
FriendlyPasswordGenerator
import java.util.Random;
public class PasswordGenerator {
String[] consonants = { "b", "c", "d", "f", "g", "h", "j", "k", "l", "m",
"n", "p", "q", "r", "s", "t", "v", "w", "x", "y", "z" };
String[] vowels = { "a", "e", "i", "o", "u" };
public String generate() {
String password = "";
adb kill-server
adb connect 127.0.0.1:53001
@rondymesquita
rondymesquita / multiple_ssh_setting.md
Created June 24, 2016 11:59 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

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 "[email protected]"
@rondymesquita
rondymesquita / gist:24e56079a117fa3428b2b9e246f2326f
Created September 5, 2016 12:57 — forked from vladimirtsyupko/gist:10964772
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master
@rondymesquita
rondymesquita / BinaryTree.js
Created October 5, 2018 12:15 — forked from benlesh/BinaryTree.js
A simple Binary Tree implementation in JavaScript
/**
* Binary Tree
* (c) 2014 Ben Lesh <[email protected]>
* MIT license
*/
/*
* A simple Binary Tree implementation in JavaScript
*/
@rondymesquita
rondymesquita / pub-sub.js
Created November 29, 2018 20:35 — forked from reu/pub-sub.js
node.js redis pub-sub example
var redis = require("redis")
, subscriber = redis.createClient()
, publisher = redis.createClient();
subscriber.on("message", function(channel, message) {
console.log("Message '" + message + "' on channel '" + channel + "' arrived!")
});
subscriber.subscribe("test");
@rondymesquita
rondymesquita / cmd.js
Created March 5, 2019 03:04 — forked from zorrodg/LICENSE
CLI Integration Test Helper
/**
* Integration test helper
* Author: Andrés Zorro <[email protected]>
*/
const { existsSync } = require('fs');
const { constants } = require('os');
const spawn = require('cross-spawn');
const concat = require('concat-stream');
const PATH = process.env.PATH;
@rondymesquita
rondymesquita / .bashrc
Created June 5, 2019 11:28 — forked from marioBonales/.bashrc
Default .bashrc for ubuntu
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@rondymesquita
rondymesquita / dotslashtaskdotjs.markdown
Created October 27, 2019 00:11
introducing ./task.js, THE new javascript task runner automation framework

why ./task.js?

One word: task automation. It's basically zero effort and you can use the ./task.js package manager to handle any repetitive tasks. You can use ./task.js to automate everything with minimum effort.

./task.js provides the structure, order, and authority that you as a developer so desperately crave. ./task.js will also take responsibility for your actions if you need it to. It's what everybody is using now. ./task.js is the new hotness. It's all about ./task.js now, just like that.

This is compared to npm run/bash scripts, which are:

var saveBlob = (function () {
var a = document.createElement("a");
document.body.appendChild(a);
a.style = "display: none";
return function (blob, fileName) {
var url = window.URL.createObjectURL(blob);
a.href = url;
a.download = fileName;
a.click();
window.URL.revokeObjectURL(url);