Skip to content

Instantly share code, notes, and snippets.

View rondymesquita's full-sized avatar

Rondinelli Mesquita rondymesquita

View GitHub Profile
@rondymesquita
rondymesquita / HttpServer.cs
Created February 27, 2025 11:39 — forked from define-private-public/HttpServer.cs
A Simple HTTP server in C#
// Filename: HttpServer.cs
// Author: Benjamin N. Summerton <define-private-public>
// License: Unlicense (http://unlicense.org/)
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Threading.Tasks;
@rondymesquita
rondymesquita / xvfb-xserverrc.sh
Created January 14, 2023 23:33 — forked from hute37/xvfb-xserverrc.sh
Xvfb startup for nomachine headless (wayland) virtual desktop session
#!/bin/sh
##
# Xvfb headless startup
#
# #see: https://www.nomachine.com/AR10K00710
##
@rondymesquita
rondymesquita / CONCURRENCY.md
Created August 1, 2020 14:30 — forked from montanaflynn/CONCURRENCY.md
Examples of sequential, concurrent and parallel requests in node.js

Concurrency in JavaScript

Javascript is a programming language with a peculiar twist. Its event driven model means that nothing blocks and everything runs concurrently. This is not to be confused with the same type of concurrency as running in parallel on multiple cores. Javascript is single threaded so each program runs on a single core yet every line of code executes without waiting for anything to return. This sounds weird but it's true. If you want to have any type of sequential ordering you can use events, callbacks, or as of late promises.

@rondymesquita
rondymesquita / fix.sh
Created June 3, 2020 16:57
Ubuntu VM in virtuabox shows 'unmanaged device' on network
sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
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);
@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:

@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 / 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 / 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 / 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
*/