手元のディレクトリが次のような構成で
./app
├── index.html
├── bar
│ └── hoge
└── foo
<?php | |
/** | |
* Config for PHP-CS-Fixer ver2 | |
*/ | |
$rules = [ | |
'@PSR2' => true, | |
// addtional rules |
-- | |
-- for command line osascript ./vpn_run.scpt and add permission to "security & privacy" | |
-- | |
activate application "Cisco AnyConnect Secure Mobility Client" | |
tell application "System Events" | |
repeat until window 1 of process "Cisco AnyConnect Secure Mobility Client" exists | |
end repeat | |
tell process "Cisco AnyConnect Secure Mobility Client" | |
(WIP)
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache | |
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache | |
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache | |
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache |
\documentclass[dvipdfmx]{jsarticle} | |
\usepackage{xcolor} | |
\usepackage[noalphabet]{pxchfon} | |
\setminchofont{Oradano.ttf} | |
\usepackage[first=1, last=3]{lcg} | |
\makeatletter | |
\newcount\LastFive |
<?php | |
$finder = Symfony\Component\Finder\Finder::create() | |
->notPath('bootstrap/cache') | |
->notPath('storage') | |
->notPath('vendor') | |
->in(__DIR__) | |
->name('*.php') | |
->notName('*.blade.php') | |
->ignoreDotFiles(true) |
Promise.reverse = function reverse(promise){ | |
// 範囲を広げるために、一応instanceof Promiseではなく、thenableを通すようにしてる。 | |
switch(true){ | |
case (typeof(promise) !== "object"): | |
case (promise === null): | |
case (typeof(promise.then) !== "function"): | |
return Promise.reject(promise); | |
} | |
return promise.then((data)=> Promise.reject(data), (err)=> Promise.resolve(err)); |
import asyncSleep from "./asyncSleep.js"; | |
function asyncDOMContentLoaded(target=window, timeout=10000){ | |
if(target.document.readyState !== "loading"){ | |
return Promise.resolve({ target, data: null }); | |
} | |
return Promise.race([ | |
asyncSleep(timeout).then(Promise.reject(new Error("asyncDOMContentLoaded is timeout"))), | |
new Promise((resolve, reject)=>{ |