Skip to content

Instantly share code, notes, and snippets.

View primofin's full-sized avatar
πŸš€
If you never try, you’ll never know

Vy Nguyen Thanh primofin

πŸš€
If you never try, you’ll never know
View GitHub Profile
@primofin
primofin / tailwind.md
Created September 14, 2021 16:50 — forked from sandren/tailwind.md
Tailwind CSS best practices

Tailwind CSS best practices

Utility classes

  1. When writing a string of multiple utility classes, always do so in an order with meaning. The "Concentric CSS" approach works well with utility classes (i.e,. 1. positioning/visibility 2. box model 3. borders 4. backgrounds 5. typography 6. other visual adjustments). Once you establish a familiar pattern of ordering, parsing through long strings of utility classes will become much, much faster so a little more effort up front goes a long way!

  2. Always use fewer utility classes when possible. For example, use mx-2 instead of ml-2 mr-2 and don't be afraid to use the simpler p-4 lg:pt-8 instead of the longer, more complicated pt-4 lg:pt-8 pr-4 pb-4 pl-4.

  3. Prefix all utility classes that will only apply at a certain breakpoint with that breakpoint's prefix. For example, use block lg:flex lg:flex-col lg:justify-center instead of block lg:flex flex-col justify-center to make it very clear that the flexbox utilities are only applicable at the

#!/usr/bin/env bash
echo "
----------------------
NODE & NPM
----------------------
"
# add nodejs 12 ppa (personal package archive) from nodesource
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
@primofin
primofin / reactjs-interview-tips.md
Created April 16, 2021 20:46 — forked from paulnguyen-mn/reactjs-interview-tips.md
BΓ­ kΓ­p cho buα»•i phỏng vαΊ₯n ReactJS thΓ nh cΓ΄ng πŸŽ‰

BΓ­ kΓ­p cho buα»•i phỏng vαΊ₯n ReactJS thΓ nh cΓ΄ng πŸŽ‰

From unplash.com

AGENGA:

  1. Mα»™t vΓ i lΖ°u Γ½ chung
  2. Γ”n tαΊ­p kiαΊΏn thα»©c JS/ReactJS
  3. CΓ y thuαΊ­t toΓ‘n, giαΊ£i thuαΊ­t
  4. TΓ¬m hiểu về cΓ΄ng ty mΓ  mΓ¬nh xin α»©ng tuyển
@primofin
primofin / vscode_shortcuts.md
Created March 28, 2021 12:39 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@primofin
primofin / activity_main.xml
Created November 6, 2020 14:42
main layout of private keyboard project
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<ScrollView
@primofin
primofin / iterm2.md
Created November 3, 2020 13:52 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab ⌘ + T
Close Tab or Window ⌘ + W (same as many mac apps)
Go to Tab ⌘ + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction ⌘ + Option + Arrow Key
Cycle iTerm Windows ⌘ + backtick (true of all mac apps and works with desktops/mission control)
@primofin
primofin / gist:a65626c5d809005109eeb92f7072cd6d
Created September 27, 2020 11:51 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

//
// ScoreTableViewController.swift
// geoapp
//
// Created by nguyen thanh vy on 25/04/2020.
// Copyright Β© 2020 team geo app. All rights reserved.
//
import UIKit
import Firebase
@primofin
primofin / sockMerchant.js
Created April 5, 2020 15:50
JavaScript: HackerRank Sock Merchant
/* https://www.hackerrank.com/challenges/sock-merchant */
let pairs = 0
const unpaired = new Set()
for (const color of arr)
if (unpaired.has(color)) {
pairs++
unpaired.delete(color)
} else unpaired.add(color)