Skip to content

Instantly share code, notes, and snippets.

View MForMarlon's full-sized avatar
🎹
or ⌨️ or 😮 or 😴

Marlon Evangelista MForMarlon

🎹
or ⌨️ or 😮 or 😴
View GitHub Profile
@MForMarlon
MForMarlon / .zshrc
Created March 7, 2022 19:35
ZSH settings with git completion and a simpler prompt with colors
export NODE_ENV=localdev
export PATH=$PATH:~/homebrew/bin:/usr/local/bin
alias ll='ls -al'
zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash
fpath=(~/.zsh $fpath)
autoload -Uz compinit && compinit
@MForMarlon
MForMarlon / NumberField.jsx
Last active February 17, 2022 19:15
A react component that Increases/decreases integers in a text field
import React, { useState } from 'react'
import './NumberField.less'
export default function NumberField({
defaultValue = null,
allowNegatives = true,
allowZero = false,
onChange,
}) {
const [value, setValue] = useState(defaultValue || 0)
@MForMarlon
MForMarlon / App.js
Created June 19, 2020 07:03
Simple React Tags generator
import React, {useState, useEffect} from "react";
import "./styles.css";
export default function App() {
return (
<div className="App">
<Tags tags={['abc', '123']} />
</div>
);
}
@MForMarlon
MForMarlon / download-from-abs.js
Last active February 7, 2020 22:23
Downloading blobs from Azure Blob Storage
/***
* The ABS JS examples from Microsoft demonstrate how to download blobs as text.
* This example shows a generalized solution.
* Assumes node v12 and express framework
***/
const { BlobServiceClient } = require('@azure/storage-blob');
const STORAGE_CONN = "your_azure_storage_connection_string";
const CONTAINER_NAME = "your_azure_container_name";
@MForMarlon
MForMarlon / pedestrian-tracker.js
Created January 12, 2019 00:16
Pedestrian tracker using HOG Descriptor and opencv4nodejs
// based from https://github.com/justadudewhohacks/opencv4nodejs/tree/master/examples/simpleTracking1.js
// This code is meant to be run on a Raspberry Pi 3 with the picamera.
// NOTE: Before running this code, for OpenCV to detect the camera, you need to run sudo modprobe bcm2835-v4l2
// TODO: Write each detected frame to an image file somewhere, with the timestamp in the name
const cv = require('opencv4nodejs');
const delay = 50;
const hog = new cv.HOGDescriptor();
hog.setSVMDetector(cv.HOGDescriptor.getDefaultPeopleDetector());
Verifying that +mformarlon is my blockchain ID. https://onename.com/mformarlon