npm i -g yarn
This file contains 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
*{ | |
margin: 0; | |
padding: 0; | |
} | |
/* | |
Font size: 12 | |
Line height: 1.5 | |
Scale Factor: 1.618 | |
*/ |
This file contains 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
src = "https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"; | |
sc = document.createElement("script"); | |
sc.type = "text/javascript"; | |
sc.src = src; | |
document.body.appendChild(sc); | |
var tweetText = $(".js-tweet-text.tweet-text:contains('誰か')") | |
var tweet = tweetText.parents('li') |
This file contains 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
# coding: utf-8 | |
from selenium import webdriver | |
from bs4 import BeautifulSoup | |
options = webdriver.ChromeOptions() | |
options.set_headless() | |
driver = webdriver.Chrome(chrome_options=options) | |
driver.get('https://www.google.co.jp/') |
This file contains 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 | |
$data = [ | |
"AAA"=>"XXX", | |
"BBB"=>"YYY", | |
]; | |
function createJSON($data){ | |
return json_encode($data, JSON_UNESCAPED_UNICODE); | |
} |
This file contains 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
export const isObject = target => | |
value !== null && typeof value !== "undefined" && Object(value) === value; | |
export const isArray = target => Array.isArray(target); | |
export const isString = target => typeof target === "string"; | |
// template literalという型は存在しないが | |
export const isTemplateLiteral = target => !!target.raw; |
This file contains 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 url = ""; | |
const options = { | |
credentials: 'include', | |
mode: 'cors' | |
} | |
fetch(url, options) | |
.then(res => res.json()) | |
.then((json) => { | |
console.log(json) |
This file contains 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
... | |
if [ -e myscripts.sh ]; then | |
source myscripts.sh | |
fi |
This file contains 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 range = (from, to, step) => { | |
if (from === undefined) return []; | |
if (to === undefined) return [...Array(from).keys()]; | |
if (step === undefined) | |
return [...Array(to - from).keys()].map(x => x + from); | |
return [...Array(Math.ceil((to - from) / step)).keys()].map( | |
x => x * step + from | |
); | |
}; | |
export default range; |
This file contains 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
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install python3 | |
pip3 install jupyter | |
jupyter notebook |