Skip to content

Instantly share code, notes, and snippets.

View a-tokyo's full-sized avatar

Ahmed Tarek a-tokyo

View GitHub Profile
@a-tokyo
a-tokyo / envFileToJS.js
Created March 12, 2020 17:49
Converts a .env file to a .env.js file
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const os = require('os');
/**
* Writes bash env variables to a .env.js file
*/
// const _bashEnvToEnvFileJs = () => {
// /** Destination Env file path */
@a-tokyo
a-tokyo / dependabot-rn-support.yml
Last active December 7, 2022 01:26
Github action that adds react-native support to dependabot by automatically running pod install after dependabot upgrades an npm/yarn package.
# This adds react-native support to dependabot by automatically running pod install after dependabot upgrades an npm/yarn package.
# Dependabot open issue: https://github.com/dependabot/dependabot-core/issues/935#issuecomment-698481919
name: Update Cocoapods Dependencies after Dependabot package upgrade
on:
push:
branches:
- dependabot/npm_and_yarn/** # OR dependabot/npm_and_yarn/**react-native** to run only for packages that have react-native in the name
pull_request:
branches:
- dependabot/npm_and_yarn/** # OR dependabot/npm_and_yarn/**react-native** to run only for packages that have react-native in the name
@a-tokyo
a-tokyo / first_last_name_validation_regex.md
Last active May 28, 2021 15:17
First name and last name validation for forms and databases using Regex.
@a-tokyo
a-tokyo / .stylelintrc.js
Created January 26, 2023 19:37
stylelint-selector-class-pattern-bem
/** Root Stylelint configuration */
module.exports = {
rules: {
/** selector class pattern must match [BEM CSS](https://en.bem.info/methodology/css) - [Regex](https://regexr.com/3apms) */
'selector-class-pattern': [
'^[a-z]([-]?[a-z0-9]+)*(__[a-z0-9]([-]?[a-z0-9]+)*)?(--[a-z0-9]([-]?[a-z0-9]+)*)?$',
{
/** This option will resolve nested selectors with & interpolation. - https://stylelint.io/user-guide/rules/selector-class-pattern/#resolvenestedselectors-true--false-default-false */
resolveNestedSelectors: true,
/** Custom message */