Skip to content

Instantly share code, notes, and snippets.

@phungrk
phungrk / .jsx
Last active November 14, 2019 03:50
React Practice - Imperative vs Declarative way go with Data down and action up concept
import React from "react";
import ReactDOM from "react-dom";
//
const PersonOne = () => {
const [feeling, setFeeling] = React.useState("normal");
const handleOnChangeFeeling = feeling => {
setFeeling(feeling);
};
return (
<div>
@phungrk
phungrk / Installing XHProf for AMPPS and PHP 7.2 on Mac OS 10.13 .md
Last active July 12, 2018 09:55
Installing XHProf for AMPPS and PHP 7.2 on Mac OS 10.13

Change directory

cd /Applications/AMPPS/www

Clone xhprof for PHP7.2

git clone https://github.com/longxinH/xhprof
@phungrk
phungrk / sed cheatsheet
Created May 18, 2018 04:19 — forked from un33k/sed cheatsheet
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'
@phungrk
phungrk / gist:f794f618694fe3df1f0c92c830e1f5da
Created January 23, 2018 06:14
IE で li 要素の記号が消えない問題 / list-style-type: none
http://xn--lcki7of.jp/149/
use
list-style-image: url(data:0);
// ==================================================
// Sticky header
// ==================================================
var timer = false;
var waypoint = undefined;
var paddingTop = 0;
var window_width = 0;
var $nav = $('.js-sticky');
function calNavHeight() {