Skip to content

Instantly share code, notes, and snippets.

View evsar3's full-sized avatar
🏠
Working from home

Evandro Araújo evsar3

🏠
Working from home
View GitHub Profile
@evsar3
evsar3 / hexdump.ts
Created October 4, 2023 17:03
HexDump for TypeScript/Javascript
function hexdump (data: Uint8Array, bytesPerLine = 16): string {
const result: string[] = []
for (let i = 0; i < data.length; i += bytesPerLine) {
const chunk = data.slice(i, i + bytesPerLine)
const address = i.toString(16)
.padStart(8, '0')
const hex = Array.from(chunk, byte => byte.toString(16)
@evsar3
evsar3 / sshfsOptions.js
Created May 22, 2020 15:58
List of all SSHFS options
/**
* List of all SSHFS options available in the manual
* The manual reference can be found here:
* https://linux.die.net/man/1/sshfs
*/
const sshfsOptions = [
{
name: 'reconnect',
type: 'bool',
LocalStorage = {
preffix: "",
set: function (key, value, encode) {
key = this.preffix + key;
this.preffix = "";
if (encode) {
key = LocalStorage.encode(key);
@evsar3
evsar3 / README.md
Last active June 26, 2017 20:14
Javascript Timer class | Javascript setInterval extension

Javascript Timer Class

Constructing

// Basic
var timer = new Timer(1000, function () {
    console.log("Tick Tac!");
});

// Call the callback imediatelly