Skip to content

Instantly share code, notes, and snippets.

View brionmario's full-sized avatar
🕯️
Candle light coding

Brion Mario brionmario

🕯️
Candle light coding
View GitHub Profile
{
"rulesDirectory": [
"node_modules/codelyzer"
],
"rules": {
"arrow-return-shorthand": true,
"callable-types": true,
"class-name": true,
"comment-format": [
true,
# @author - Brion Silva
# Copyright © 2018 Aparecium Labs. All Rights Reserved
scss_files: 'src/**/*.scss'
exclude:
- 'node_modules/**/*.scss'
linters:
# Reports when you use improper spacing around ! (the "bang") in !default,
# @author - Brion Silva
# Copyright © 2018 Aparecium Labs. All Rights Reserved
files:
include: src/**/*.scss
options:
formatter: stylish
merge-default-rules: false
rules:
border-zero: 1
STEPS
1. Download wget
brew install wget
2. Download a cookie exporter extension for the browser
For Chrome - https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg?hl=en
For Firefox - https://addons.mozilla.org/en-US/firefox/addon/cookie-exporter/
3. Download Xcode from Apple developer website
@brionmario
brionmario / cv_version_checker.py
Created February 24, 2019 13:42
This simple util can be used to check the OpenCV version available in the environment
# -*- coding: utf-8 -*-
"""
This simple util can be used to check the OpenCV version
available in the environment.
Usage:
Can be used to handle backward compatibility issues across OpenCV versions.
"""
# @author - Brion Silva
# Copyright © 2018 Aparecium Labs. All Rights Reserved
# Outputs
src/**/*.js
src/**/*.js.map
src/**/*.d.ts
out-tsc
# Logs
@brionmario
brionmario / useAPI.ts
Created September 24, 2019 19:37
Custom API hook to handle network requests
import axios, { AxiosRequestConfig } from "axios";
import React, { useEffect, useState } from "react";
import { HttpError, HttpRequestConfig, HttpResponse } from "../models/api";
/**
* Custom API hook to handle network requests.
*
* @param {HttpRequestConfig} config
* @param {(response: HttpResponse) => void} onSuccessCallback
* @param {(error: HttpError) => void} onErrorCallback
export const loadResourcesAtRuntime = async (meta: SupportedLanguages, bundleLocation: string) => {
let resources: Resource = {};
for (const locale of Object.values(meta)) {
for (const [ nsKey, nsPath ] of Object.entries(locale.paths)) {
try {
const response = await fetch(`${ bundleLocation }/${ nsPath }`);
const payload = await response.json();
import React, { Fragment } from 'react';
import PropTypes from 'prop-types';
import uniqid from 'uniqid';
import {
FormGroup, ControlLabel, FormControl, InputGroup,
} from 'react-bootstrap';
import Select from 'react-select';
import 'react-select/dist/react-select.css';
import Dropzone from 'react-dropzone';
import { CustomCheckbox as Checkbox, CustomSwitch as Switch } from '../elements';
identity-apps/
├── apps/
│ ├── console/ * contains admin portal source files
│ │ ├── features/ * self-contained features.
│ │ │ ├── applications/ * application management feature.
│ │ │ │ ├── api * api functions for application management.
│ │ │ │ ├── components * components for application management.
│ │ │ │ ├── config * ui, endpoint etc. configurations.
│ │ │ │ ├── pages * pages for application management features.
│ │ │ │ └── models * models for application management.