Skip to content

Instantly share code, notes, and snippets.

View romelgomez's full-sized avatar
:octocat:
https://www.linkedin.com/in/romelgomez/

Romel Gomez romelgomez

:octocat:
https://www.linkedin.com/in/romelgomez/
View GitHub Profile
@romelgomez
romelgomez / build_and_push_docker_hub.yaml
Created August 2, 2024 23:36 — forked from nbeck415/build_and_push_docker_hub.yaml
This GitHub Actions workflow builds a Docker image and pushes it a container registry every time someone commits to main.
name: Build and push to Docker Hub
on:
push:
branches:
- main
jobs:
push_to_docker_hub:
runs-on: ubuntu-latest
steps:
@romelgomez
romelgomez / README.md
Created October 25, 2023 14:42 — forked from tmilos/README.md
Modified Preorder Tree Traversal

Modified Preorder Tree Traversal

Hierarchical data metrics that allows fast read operations on tree like structures.

Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.

Sample implementation

@romelgomez
romelgomez / array_of_arrays.sql
Created April 3, 2023 20:18 — forked from AnjaneyuluBatta505/array_of_arrays.sql
merge array of arrays in postgresql with array_agg
--select ARRAY(select distinct unnest(array_agg(category.arr)))
select ARRAY(select distinct unnest(array[array[1,2,3], array[4,2,8]]))
@romelgomez
romelgomez / fix-missing-libcrypto-osx.md
Created March 10, 2023 21:03 — forked from aklap/fix-missing-libcrypto-osx.md
Resolving missing link to libcrypto/openssl on OSX
@romelgomez
romelgomez / nodereinstall.sh
Created October 26, 2021 13:04 — forked from brock/nodereinstall.sh
Complete Node Reinstall. I've moved this to a repo at http://git.io/node-reinstall
#!/bin/bash
# node-reinstall
# credit: http://stackoverflow.com/a/11178106/2083544
## program version
VERSION="0.0.13"
## path prefix
PREFIX="${PREFIX:-/usr/local}"
@romelgomez
romelgomez / index.js
Created September 27, 2021 14:28 — forked from kosich/index.js
Pausable Observable with buffer
const { rxObserver, palette } = require('api/v0.3');
const { merge, timer, Subject, from, empty } = require('rxjs');
const { filter, startWith, bufferToggle, take, flatMap, zip, distinctUntilChanged, share, skip, map, windowToggle } = require('rxjs/operators');
// stream for coloring
const palette$ = from(palette);
const source$ = timer(0, 10).pipe(
take(10),
// get color for each item

Libraries and Tools for React

Components and Component Libraries

If you're developing an application based on React it can be helpful if you don't need to develop all the basic UI components yourself. Here you can find a list with various components, component libraries and complete design systems developed with and for React.

Component libraries and Design Systems

Brands (official design systems by various companies and products)

// Add a 401 response interceptor
window.axios.interceptors.response.use(function (response) {
return response;
}, function (error) {
if (401 === error.response.status) {
swal({
title: "Session Expired",
text: "Your session has expired. Would you like to be redirected to the login page?",
type: "warning",
showCancelButton: true,
// based on Алексей Сердюков's answer at Stackoverflow (https://stackoverflow.com/a/50837219/1143392)
import {
Directive,
Input,
OnDestroy,
OnInit
} from '@angular/core';
import { MediaObserver } from '@angular/flex-layout';
import { MatGridList } from '@angular/material';
@romelgomez
romelgomez / git_submodules.md
Created October 11, 2019 14:17 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.