フォルダ内のファイル内の文字列検索 grep -rn word * で、カレントディレクトリ以下のファイルから、wordという文字列を検索できる。 -nオプションは行番号表示。 tsakaハック2016.03.01 583
google spread sheetをPythonでいじりたい インストール pip install gspread pip install –upgrade google-api-python-client 以下実行 # -*- coding:utf-8 -*- import j… Okuyaハック2016.03.01 1,290
ファイル検索コマンド find /dir -name “*.txt” で、/dirディレクトリ以下の、名称が”〜.txt”となっているファイルを検索できる。 tsakaハック2016.03.01 322
google spread sheetをRubyでいじりたい google_driveをまずインストールして、とのことなのでインストールを試みる。 # gem install google_drive Building native extensions. This could t… Okuyaハック2016.03.01 464
brewでDockerをインストールする 最近、Dockerが流行っているのでインストールしてみます。 まずは、検索してみましょう。 $ brew search docker boot2docker docker-machine-parallels homebr… YY3ai2ui24ハック2016.03.01 362
iptablesで特定IPからのアクセスを拒否する iptables -I INPUT -s xxx.xxx.xxx.xxx -j DROP 再起動後も適用する場合 service iptables save 設定を解除する場合 iptables –line-numbe… 高瀬 裕介ハック2016.03.01 1,545
MacにHomebrewでPostgresをインストールしようとしたらエラーになった プロセスがいない > ps auxw | grep post initdbしようとするとエラーになる could not connect to server: No such file or directory I… @iwasakiハック2016.02.29 513
nginxで許可したIP以外はBasic認証をかける nginxの設定で以下のようにします。 location / { satisfy any; auth_basic “Basic Auth”; auth_basic_user_file /path/to/.htpasswd… alkoshikawaハック2016.02.29 2,157
javascriptで連想配列のソート JavaScriptで連想配列をソートするには以下のようにします $(function(){ //配列 var fruits = [ {name:”Apple”,amounts:200} ,{name:”Strawber… kensuke-iizukaハック2016.02.29 791