Skip to content

Instantly share code, notes, and snippets.

View phuochau's full-sized avatar
👨‍💻

Hau Vo phuochau

👨‍💻
View GitHub Profile
@parafeu
parafeu / scrollbar.js
Last active September 3, 2022 19:29
Scrollbar plugin tailwindcss
const plugin = require("tailwindcss/plugin");
module.exports = plugin(function ({ addUtilities, matchUtilities, theme }) {
const scrollbarTrackColorValue = (value) => ({
'--scrollbar-track': value,
'&::-webkit-scrollbar-track': {
"background-color": value
}
})
@phuochau
phuochau / using-react-navigation-4x-with-mobx.md
Last active October 2, 2019 16:50
Use react-navigation 4.x with mobx

NAVIGATION OPTIONS

export const StackNavigationOptions = (params = {}) => {
  let { headerStyle, headerTitleStyle, ...others } = params

  if (!headerStyle) headerStyle = {}
  if (!headerTitleStyle) headerTitleStyle = {}
@janicduplessis
janicduplessis / androidx-class-mapping.csv
Last active May 20, 2020 20:10
Update react-native libraries under node_modules to androidx
Support Library class Android X class
android.support.v8.renderscript.Allocation android.renderscript.Allocation
android.support.v8.renderscript.Element android.renderscript.Element
android.support.v8.renderscript.RenderScript android.renderscript.RenderScript
android.support.v8.renderscript.ScriptIntrinsicBlur android.renderscript.ScriptIntrinsicBlur
android.support.transition.AnimatorUtils androidx.transition.AnimatorUtils
android.support.transition.ArcMotion androidx.transition.ArcMotion
android.support.transition.AutoTransition androidx.transition.AutoTransition
android.support.transition.ChangeBounds androidx.transition.ChangeBounds
android.support.transition.ChangeClipBounds androidx.transition.ChangeClipBounds
@sdpjswl
sdpjswl / Deep mutable copy
Last active June 11, 2018 10:52
Get a deep Mutable copy of NSArray and NSDictionary
+ (NSMutableDictionary *)deepMutableCopyOfDictionary:(NSDictionary *)dictionary
{
return (__bridge_transfer NSMutableDictionary *)CFPropertyListCreateDeepCopy(kCFAllocatorDefault, (__bridge CFDictionaryRef)dictionary, kCFPropertyListMutableContainers);
}
+ (NSMutableArray *)deepMutableCopyOfArray:(NSArray *)array
{
return (__bridge_transfer NSMutableArray *)CFPropertyListCreateDeepCopy(kCFAllocatorDefault, (__bridge CFArrayRef)array, kCFPropertyListMutableContainers);
}
@irazasyed
irazasyed / homebrew-permissions-issue.md
Last active May 2, 2024 22:51
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

ACTION
AD_HOC_CODE_SIGNING_ALLOWED
ALTERNATE_GROUP
ALTERNATE_MODE
ALTERNATE_OWNER
ALWAYS_SEARCH_USER_PATHS
ALWAYS_USE_SEPARATE_HEADERMAPS
APPLE_INTERNAL_DEVELOPER_DIR
APPLE_INTERNAL_DIR
APPLE_INTERNAL_DOCUMENTATION_DIR