npm i -g yarn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.column-reverse{ | |
display: flex; | |
flex-wrap: wrap; | |
flex-direction: column-reverse; | |
} |
example
$ export CLICOLOR=1
lsコマンドカラー表示の有効化
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read i; do sudo rm /usr/local/${i}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getParams(){ | |
$return = array(); | |
if (isset($_GET) && is_array($_GET)) { | |
$return += $_GET; | |
} | |
if (isset($_POST) && is_array($_POST)) { | |
$return += $_POST; | |
} | |
return $return; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Object.assign: | |
<div style={Object.assign({}, style1, style2)}/> | |
//Lodash's assign function: | |
<div style={_.assign({}, style1, style2)}/> | |
//ES7 object spread: | |
<div style={{...style1, ...style2}}/> | |
//radium: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const obj = {key1: "value1", key2: "value2"} | |
const {[Object.keys(obj).pop()]:lastVal} = obj | |
console.log(lastVal) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const a = [2,3,4] | |
a.push(9) | |
console.log(a) // [2,3,4,9] | |
const b = {"key": "value"} | |
b.key = "newValue" |
OlderNewer