Navigation Menu

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
# @author - Brion Silva
# Copyright © 2018 Aparecium Labs. All Rights Reserved
# Outputs
src/**/*.js
src/**/*.js.map
src/**/*.d.ts
out-tsc
# Logs
# @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,
{
"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
files:
include: src/**/*.scss
options:
formatter: stylish
merge-default-rules: false
rules:
border-zero: 1
@brionmario
brionmario / History|-100c01fb|entries.json
Last active December 10, 2022 08:25
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/brion/Desktop/wso2/identity-app-projects/identity-apps/apps/console/src/features/users/components/user-profile.tsx","entries":[{"id":"Aykc.tsx","timestamp":1669115669058},{"id":"Z3Ei.tsx","timestamp":1669115689791},{"id":"uBmz.tsx","timestamp":1669115707973},{"id":"scnZ.tsx","timestamp":1669121201706},{"id":"RBVC.tsx","timestamp":1669121221245},{"id":"ASd4.tsx","source":"undoRedo.source","timestamp":1669121227297},{"id":"tr7J.tsx","timestamp":1669121261375},{"id":"HsRL.tsx","timestamp":1669121309719},{"id":"FdpH.tsx","source":"undoRedo.source","timestamp":1669121316783},{"id":"5o2Z.tsx","timestamp":1669121352884},{"id":"LSFP.tsx","timestamp":1669121370460},{"id":"apjs.tsx","source":"undoRedo.source","timestamp":1669121384032},{"id":"mmWS.tsx","timestamp":1669121462841},{"id":"u5Lk.tsx","timestamp":1669121493929}]}
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.
"""
@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';