Skip to content

Instantly share code, notes, and snippets.

View xheuz's full-sized avatar
🚀

Victor Natschke xheuz

🚀
  • United States
View GitHub Profile
@xheuz
xheuz / bash.generate.random.alphanumeric.string.sh
Created March 15, 2019 18:21 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@xheuz
xheuz / Common-Currency.json
Created June 30, 2019 12:58 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@xheuz
xheuz / pwa.md
Created February 5, 2020 17:07 — forked from HenriqueLimas/pwa.md

PWA

A lot of people think that native web its best than web

PWA they combine the best of the web with the best of the app

  • reliable (low connection)
  • fast (animation)
  • engagable (notificaiton, home screen)

Caching strategies

@xheuz
xheuz / intro.md
Created February 5, 2020 17:22 — forked from lxyad/intro.md
pwa

PWA

What and Why

What

Definitions:

Unlike traditional applications, progressive web apps are a hybrid of regular web pages (or websites) and a mobile application. This new application model attempts to combine features offered by most modern browsers with the benefits of mobile experience.

@xheuz
xheuz / Antimony.css
Created March 19, 2020 14:07 — forked from ollytheninja/Antimony.css
Markdown css Just add <link href="style.css" rel="stylesheet"></link> to the start of your markdown document.
* { margin: 0; padding: 0; }
abbr,acronym,blockquote,code,dir,kbd,listing,plaintext,q,samp,tt,var,xmp { hyphens: none; }
html {
padding: 2em;
font: normal 18px/1.25 Source Sans Pro, sans-serif;
color: #000;
hyphens: auto;
@xheuz
xheuz / numberWithThousandsSeparator.js
Last active April 2, 2020 20:04
A javascript solution to add thousands separator to numbers
export const numberWithThousandsSeparator = (
number,
decimalDigits = 0,
separator = ",",
decimalSeparator = "."
) => {
let isNegative = false;
if (!number) return number;
if (number >= 0 && number < 1000)

For example, to override the AppBar (https://material-ui-next.com/api/app-bar/) root class we can do the following:

First method (override Material UI classnames):

1 - Add the property classes in the AppBar component:

    <AppBar classes={{root: 'my-root-class'}}
Dependences:
sudo apt-get update
sudo apt-get install build-essential
apt-get install python-dev
sudo pip install -U setuptools
Steps:
download from https://mrjbq7.github.io/ta-lib/install.html
@xheuz
xheuz / pubsub.py
Created July 22, 2021 16:18 — forked from appeltel/pubsub.py
asyncio pubsub example
import asyncio
import random
class Hub():
def __init__(self):
self.subscriptions = set()
def publish(self, message):
@xheuz
xheuz / uuid_user.py
Created February 3, 2023 06:44 — forked from gmolveau/uuid_user.py
sqlalchemy uuid for sqlite
########################
# UUID for SQLite hack #
########################
from sqlalchemy.types import TypeDecorator, CHAR
from sqlalchemy.dialects.postgresql import UUID
import uuid
class GUID(TypeDecorator):