Skip to content

Instantly share code, notes, and snippets.

View ejirocodes's full-sized avatar
Shipping

Ejiro Asiuwhu ejirocodes

Shipping
View GitHub Profile
@PicchiKevin
PicchiKevin / migrate.sh
Last active November 16, 2023 11:02
Heroicons v1 to v2
find . -type f -not -path '*/.*' -path '*.js' -not -path './node_modules*' -not -path 'migrate.js' -exec sed -i '' -e 's/AdjustmentsVerticalIcon/AdjustmentsVerticalIcon/g' {} +
find . -type f -not -path '*/.*' -path '*.js' -not -path './node_modules*' -not -path 'migrate.js' -exec sed -i '' -e 's/ChatBubbleBottomCenterTextIcon/ChatBubbleBottomCenterTextIcon/g' {} +
find . -type f -not -path '*/.*' -path '*.js' -not -path './node_modules*' -not -path 'migrate.js' -exec sed -i '' -e 's/ArchiveBoxIcon/ArchiveBoxIcon/g' {} +
find . -type f -not -path '*/.*' -path '*.js' -not -path './node_modules*' -not -path 'migrate.js' -exec sed -i '' -e 's/ArrowDownCircleIcon/ArrowDownCircleIcon/g' {} +
find . -type f -not -path '*/.*' -path '*.js' -not -path './node_modules*' -not -path 'migrate.js' -exec sed -i '' -e 's/ArrowLeftCircleIcon/ArrowLeftCircleIcon/g' {} +
find . -type f -not -path '*/.*' -path '*.js' -not -path './node_modules*' -not -path 'migrate.js' -exec sed -i '' -e 's/ArrowRightCircleIcon/ArrowRightCircleI
@antfu
antfu / 📊 Weekly development breakdown
Last active November 20, 2023 10:25
📊 Weekly development breakdown
TypeScript 21 hrs 47 mins ████████████████▒░░░ 67.1%
Vue.js 6 hrs 21 mins ██████▓░░░░░░░░░░░░░ 19.6%
JSON 2 hrs 10 mins ████▒░░░░░░░░░░░░░░░ 6.7%
JavaScript 46 mins ███▒░░░░░░░░░░░░░░░░ 2.4%
@mmazzarolo
mmazzarolo / elevations.ts
Last active June 1, 2022 15:12
React-Native cross platform elevation definitions
/**
* React-Native cross-platform elevations.
* Based on https://ethercreative.github.io/react-native-shadow-generator/
*
* Usage:
* 1. Import "elevations" from this file
* import { elevations } from "config/elevations";
* 2. Use it. Assuming you need an elevation of 2 (based on the Android
* elevation standard), doing the following will cast the same shadow
* on both platforms:
@rrlevy
rrlevy / CORDOVA_RESOURCES_GENERATOR.md
Last active November 9, 2021 10:53 — forked from dalezak/README.md
Ionic Capacitor Resources Generator
  1. Run npm install cordova-res --save-dev
  2. Create 1024x1024px icon at resources/icon.png
  3. Create 2732x2732px splash at resources/splash.png
  4. Add "resources": "cordova-res ios && cordova-res android && node scripts/resources.js" to scripts in package.json
  5. Copy resources.js file to scripts/resources.js
  6. Run sudo chmod -R 777 scripts/resources.js
  7. Run npm run resources
@dalezak
dalezak / README.md
Last active September 11, 2023 09:51
Ionic Capacitor Resources Generator
  1. Run npm install cordova-res --save-dev
  2. Create 1024x1024px icon at resources/icon.png
  3. Create 2732x2732px splash at resources/splash.png
  4. Add "resources": "cordova-res ios && cordova-res android && node scripts/resources.js" to scripts in package.json
  5. Copy resources.js file to scripts/resources.js
  6. Run sudo chmod -R 777 scripts/resources.js
  7. Run npm run resources
@LucasMallmann
LucasMallmann / EslintNodeJS.md
Created September 30, 2019 22:59
Eslint and Prettier configuration for NodeJS and Express projects

Eslint and prettier config for nodejs and express projects

Eslint and Libs

You need to install eslint and some other config libs.

yarn add eslint prettier eslint-config-prettier eslint-plugin-prettier -D

yarn eslint --init

.eslintrc.js

@virolea
virolea / upload.js
Last active March 15, 2024 13:45
Tracking file upload progress using axios
upload(files) {
const config = {
onUploadProgress: function(progressEvent) {
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
console.log(percentCompleted)
}
}
let data = new FormData()
data.append('file', files[0])
@andreasonny83
andreasonny83 / .gitignore
Last active May 20, 2024 11:39
Gitignore template for JavaScript projects
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# Runtime data
pids
*.pid
@kndt84
kndt84 / authorize.js
Last active May 17, 2024 03:11
Sample code: how to refresh session of Cognito User Pools with Node.js and Express
const AWS = require('aws-sdk');
const CognitoUserPool = require('amazon-cognito-identity-js-node').CognitoUserPool;
const CognitoUserSession = require('amazon-cognito-identity-js-node').CognitoUserSession;
const CognitoUser = require('amazon-cognito-identity-js-node').CognitoUser;
const CognitoIdToken = require('amazon-cognito-identity-js-node').CognitoIdToken;
const CognitoAccessToken = require('amazon-cognito-identity-js-node').CognitoAccessToken;
const CognitoRefreshToken = require('amazon-cognito-identity-js-node').CognitoRefreshToken;
const cfg = require('config').config;
const COGNITO_IDENTITY_POOL_ID = cfg.COGNITO_IDENTITY_POOL_ID;
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 23, 2024 09:28
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k