Skip to content

Instantly share code, notes, and snippets.

View cohalz's full-sized avatar
🌴
On vacation

cohalz cohalz

🌴
On vacation
View GitHub Profile
# -*- coding: utf-8 -*-
__author__ = 'cohalz'
from twitter import *
import configparser
import random
def tweet(string):
try:
tw.statuses.update(status=string)

MacTeXとTeXstudioをダウンロードサイトからインストールする

以下のコマンドを実行する (brew caskで入る場所を/Applicationsにするだけなので必須ではないけどやっとくとよい)

echo "export HOMEBREW_CASK_OPTS="--appdir=/Applications"" >> .bash_profile
echo "export HOMEBREW_CASK_OPTS="--appdir=/Applications"" >> .zprofile

ターミナル再起動する

Mac

echo "export HOMEBREW_CASK_OPTS="--appdir=/Applications"" >> .bash_profile
echo "export HOMEBREW_CASK_OPTS="--appdir=/Applications"" >> .zprofile
xcode-select --install  
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"  
brew tap phinze/cask  
brew install brew-cask  
brew cask install atom  
apm install atom-lint 
import scala.io.Source
val seqr = """.*:(.*\..*)\sIP.*seq\s[0-9]+?:(.+?),""".r
val ackr = """.*:(.*\..*)\sIP.*?Flags\s\[\.\],\sack\s(.+?),\swin.*""".r
if(args.length > 0) {
val lines = Source.fromFile(args(0)).getLines().toList
val seqs = for {
line <- lines
seq <- seqr.findFirstMatchIn(line)
(define (improve guess x)
(average guess (/ x guess)))
(define (average x y)
(/ (+ x y) 2))
(define (square x) (* x x))
(define (good-enough? guess iguess)
(= (/ guess iguess) 1))
//電波強度の平均値出すやつ
//scala dBaverage.scala tcpdump.txt(tcpdumpの結果が入ったファイル)とかすればok
import scala.io.Source
val reg = """(-[0-9]+?)dB""".r
if(args.length > 0) {
val lines = Source.fromFile(args(0)).getLines().toList
val dBs = for{
"コマンドモードでTab補完をする
set wildmenu
set wildmode=longest:full,full
set hidden "保存しなくててもバッファを切り替えられるように
set nrformats= "インクリメントを十進で
"バーを表示しない
set guioptions-=T "ツールバー
set guioptions-=m "メニューバー
set nocompatible
filetype off
set autoread
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim
call neobundle#rc(expand('~/.vim/bundle'))
endif
" ここにインストールしたいプラグインのリストを書く
NeoBundle 'LeafCage/foldCC'
set guioptions-=T "ツールバー
set guioptions-=m "メニューバー
set guioptions-=r "ウインドウの右スクロールバー
set guioptions-=R "分割時の右のスクロールバー
set guioptions-=l "ウインドウの左スクロールバー
set guioptions-=L "分割時の左のスクロールバー
" カーソル下の単語をハイライトする
" http://d.hatena.ne.jp/osyo-manga/20140121/1390309901
" 元との違いはカーソル下が記号の場合にうまく行ってなかったものを、空白区切りの単位でハイライトするようにしたこと
" 例えば >>= という記号列なども問題なくハイライトできるように
" 1 が設定されていれば有効になる
let g:enable_highlight_cursor_word = 1
augroup highlight-cursor-word
autocmd!