Skip to content

Instantly share code, notes, and snippets.

@LeeDDHH
LeeDDHH / FHS.md
Last active January 12, 2020 14:23
linux tips

Filesystem Hierarchy Standard(ファイルシステム階層標準)

Filesystem Hierarchy Standard - Wikipedia

/bin

  • binary
  • 「実行可能形式のプログラムファイル」が格納されているディレクトリ
  • OSによっては /usr/bin へソフトリンクされていることもある

/lib

  • library

apt

インストール

sudo apt install [パッケージ名]

インストール済み確認する

sudo apt content [パッケージ名]
sudo dpkg -l

HTMLCollectionとNodeListの違い

  • getElementsByTagNameやgetElementsByClassNameの返り値はHTMLCollection
    • DOMに変更を加えた際に取得した値が動的に変更されるのがHTMLCollection
  • querySelectorAllの返り値はNodeList
    • 取得した値が変更されないのがNodeList
  • 違いはHTMLCollectionは動的であり、NodeListは静的である

変数が配列かどうか判定

@LeeDDHH
LeeDDHH / version-up-howto.md
Last active October 28, 2020 06:48
macでバージョンアップが上手く聞かなかったときに試したこと

mac Mojaveでpyenvのバージョン切り替えができないときにやったこと

xcodeのコマンドラインツールを切り替える

  • xcodeインストール時に指定されるパス
    • /Applications/Xcode.app/Contents/Developer
  • コマンドラインから手動でxcode-selectをインストールしたときのパス
    • /Library/Developer/CommandLineTools
  • 切り替え
    • sudo xcode-select -switch [切り替えるパス]

Command Line Toolsを切り替える方法 | Sutepulu

一つのIPアドレスでいくつかの名前ベースのウェブサイトを仮想ホストで実行する

httpd.confの設定

#ユーザーディレクトリを有効化
#LoadModule userdir_module libexec/apache2/mod_userdir.so
↓
LoadModule userdir_module libexec/apache2/mod_userdir.so

#Include /private/etc/apache2/extra/httpd-userdir.conf

Android studio

既存のAndroid Studioをアンインストールする方法

# Android Studioの削除
$ rm -Rf /Applications/Android\ Studio.app

# Android Studioの環境設定の削除
$ rm -Rf ~/Library/Preferences/AndroidStudio*
@LeeDDHH
LeeDDHH / iOS(Object-c)-dev-tip.md
Last active December 29, 2021 02:12
iOS(Object-c)開発で知ったこと
@LeeDDHH
LeeDDHH / mac-envirenment.md
Last active November 26, 2020 05:58
mac 環境構築

homebrewをインストール

ターミナルでインストール /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

開発用アプリのインストール

brew install caskroom/cask/brew-cask
brew cask install iterm2
brew cask install visual-studio-code
brew cask install coteditor
@LeeDDHH
LeeDDHH / youtube-markdown.md
Created November 29, 2020 04:51
Youtube markdown 埋め込み
@LeeDDHH
LeeDDHH / compareVersion.js
Created December 5, 2020 09:08
compare version source and target
if (process.argv.length < 4) {
console.log('number of arguments is short');
return;
}
const sourceVersion = process.argv[2];
const targetVersion = process.argv[3];
/**
* Function