Skip to content

Instantly share code, notes, and snippets.

View hrdtbs's full-sized avatar
🎯
I may be slow to respond.

hrdtbs hrdtbs

🎯
I may be slow to respond.
View GitHub Profile
@hrdtbs
hrdtbs / npmWarnErr.md
Created October 26, 2017 07:10
npm warnings & errors

Warnings

unmet peer dependency

依存関係が満たされていない。

$ rm -r node_modules
$ (sudo) npm cache clean
$ npm install
.column-reverse{
display: flex;
flex-wrap: wrap;
flex-direction: column-reverse;
}
@hrdtbs
hrdtbs / CLICOLORS.md
Last active November 6, 2017 06:14
Terminal Settings

example

$ export CLICOLOR=1

lsコマンドカラー表示の有効化

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.*
@hrdtbs
hrdtbs / mail.php
Last active December 22, 2017 11:08
<?php
function getParams(){
$return = array();
if (isset($_GET) && is_array($_GET)) {
$return += $_GET;
}
if (isset($_POST) && is_array($_POST)) {
$return += $_POST;
}
return $return;
@hrdtbs
hrdtbs / react-marge-styles.js
Last active December 22, 2017 18:33
React - Marge Styles
//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:

h1

h2

h3

h4

h5
h6
const obj = {key1: "value1", key2: "value2"}
const {[Object.keys(obj).pop()]:lastVal} = obj
console.log(lastVal)
const a = [2,3,4]
a.push(9)
console.log(a) // [2,3,4,9]
const b = {"key": "value"}
b.key = "newValue"
@hrdtbs
hrdtbs / installing-numpy-on-windows.md
Last active February 7, 2018 11:06
Installing NumPy on Windows
  1. Install Python3

  2. $ pip3 install wheel

  3. Download an appropriate file (Python 3.7.X (x64) -> cp37,amd64) from here

  4. $ pip3 install C:\...\numpy-...+mkl-cp...-cp...m-win_amd....whl