Skip to content

Instantly share code, notes, and snippets.

View hungdev's full-sized avatar
💭
I may be slow to respond.

Hung Vu hungdev

💭
I may be slow to respond.
View GitHub Profile
@hungdev
hungdev / responsive.scss
Created June 1, 2023 08:34
a responsive mixin in SCSS
// SO responsive mixin
// a mixin is different from a function as it does not return a value but serves as placeholder for code
@mixin responsive( $breakpoint ) {
/*
breakpoints are viewport arbitrary values,
they are defined with the aim of allowing the SCSS/CSS code of your app' behave accordingly to your user's device width,
the breakpoints I used were inspired by Bootstrap =>
https://getbootstrap.com/docs/5.0/layout/breakpoints/
*/
@if $breakpoint == smartphone-portrait {
@hungdev
hungdev / Search all field in table.md
Created April 12, 2023 09:17
Search all field in table
const fields = Object.keys(data?.[0]);
const searhResponse = searchVl ? data?.filter(el => fields.find(f => el[f]?.toString()?.toLowerCase()?.includes(searchVl?.toLowerCase()))) : data;
@hungdev
hungdev / app icon and splash.md
Last active December 20, 2022 10:21
app icon and splash
https://www.appicon.co/
https://github.com/MasonLe2497/cli-tools
@hungdev
hungdev / fnm.md
Last active November 6, 2023 05:29
fnm
fnm install 16.16.0
fnm use 16.16.0
fnm default 16.16.0
@hungdev
hungdev / ngrok run multiple ports at once.md
Last active May 24, 2023 19:15
ngrok run multiple ports at once

create file ngrok.yml

authtoken: ***
version: "2"
region: "us"
tunnels:
  first:
    addr: 6006
 proto: http 
@hungdev
hungdev / show menu dev react native.md
Created September 27, 2021 16:30
show menu dev react native

CMD + Ctrl + Z -> Show Inspector

@hungdev
hungdev / Keys For Visual Studio Code.md
Created September 27, 2021 16:27 — forked from ZainaliSyed/Keys For Visual Studio Code.md
`Shortcuts & Command` for `React-Native `

React-Native Command

Windows Commands

  • rm node_modules/
  • use ; for muti line commands
  • rm $TMPDIR/react-* ; rm ios/build ; rm node_modules ; yarn cache clean ; npm cache verify

React Native

  • react-native --help
@hungdev
hungdev / react native s3 upload.md
Created September 11, 2021 16:43
react native s3 upload
import { Platform, StyleSheet } from 'react-native';
import fs from 'react-native-fs';
import { decode } from 'base64-arraybuffer';
import AWS from 'aws-sdk';
import 'react-native-get-random-values'
import { customAlphabet } from 'nanoid'

const nanoid = customAlphabet('1234567890abcdef', 10)