Skip to content

Instantly share code, notes, and snippets.

View enqtran's full-sized avatar

enqtran enqtran

View GitHub Profile
GIT:
git config --global http.postBuffer 524288000
git fetch --unshallow
On Linux
Execute the following in the command line before executing the Git command:
export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1
Descriptive: Naming Styles
There are a lot of different naming styles. It helps to be able to recognize what naming style is being used, independently from what they are used for.
The following naming styles are commonly distinguished:
b (single lowercase letter)
B (single uppercase letter)
lowercase
lower_case_with_underscores
UPPERCASE
import React, { Component } from 'react';
import { findDOMNode } from 'react-dom';
import screenfull from 'screenfull';
import ReactPlayer from 'react-player';
const MULTIPLE_SOURCES = [
{ src: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4', type: 'video/mp4' },
{ src: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.ogv', type: 'video/ogv' },
{ src: 'http://clips.vorwaerts-gmbh.de/big_buck_bunny.webm', type: 'video/webm' }
]
'playlist': '/images/stories/video/playlist_hd2.xml',
'playlist.position': 'none',
'height': '400',
'width': '685',
'wmode': 'opaque',
'abouttext': 'JW Player Plugin Advanced',
'aboutlink': 'http://www.joomlarulez.com/example-jw-player-plugin.html',
'playbackRateControls': 'true',
'advertising': {
'client': 'vast',
@enqtran
enqtran / V2
Last active January 18, 2023 14:30
JavaScript Library for building User Interfaces
React Community
https://stackoverflow.com/questions/tagged/reactjs
439,112 questions
https://twitter.com/reactjs
656,8 N Người theo dõi
https://github.com/facebook/react
# pull official base image
FROM node:14 AS builder
# set working directory
WORKDIR /app
# install app dependencies
#copies package.json and package-lock.json to Docker environment
COPY package.json ./
'git log' failed with code 1:'xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun'
'git status' failed with code 1:'xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun'
=> Fix :
- Open terminal
- Run: xcode-select --install
Three.js
Pixi.js
Phaser
Babylon.js
Matter.js
PlayCanvas
import { useLayoutEffect } from 'react'
import { useLocation } from 'react-router-dom'
const ScrollToTop = () => {
const { pathname } = useLocation()
useLayoutEffect(() => {
window && window.scrollTo(0, 0)
}, [pathname])
@enqtran
enqtran / [ReactJS] Detect Scrolls To Bottom
Last active May 25, 2022 19:16
[ReactJS] Detect Scrolls To Bottom
constructor(props) {
super(props);
this.state = {
height: window.innerHeight,
message: 'not at bottom'
};
this.handleScroll = this.handleScroll.bind(this);
}
handleScroll() {
const windowHeight = "innerHeight" in window ? window.innerHeight : document.documentElement.offsetHeight;