勉強したこと、調べたことを記録する
スクリプトの実行がシステムで無効になっているため、ファイル C:\hoge\job.ps1 を読み込めません。詳細については、「get-help about_signing」と入力してヘルプを参照してください。 発生場所 行:1 文字:12 + .\job.ps1 <<<<
32-bit: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe 64-bit: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
> C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe PS C:\hoge > Set-ExecutionPolicy RemoteSigned PS C:\hoge > exit > > C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe PS C:\hoge > Set-ExecutionPolicy RemoteSigned PS C:\hoge > exit
groovy> pa = [] groovy> pa << "a" groovy> pa << "b" groovy> pa.push("c") groovy> pa.push("d") groovy> println "01 check :" + pa groovy> println "02 tail :" + pa.tail() groovy> println "03 check :" + pa groovy> println "04 pop :" + pa.pop() groovy> println "05 check :" + pa groovy> println "06 head :" + pa.head() groovy> println "07 check :" + pa groovy> println "08 index1:" + pa[1] groovy> println "09 check :" + pa groovy> println "10 slice :" + pa[1..pa.size()-1] groovy> println "11 check :" + pa groovy> println "12 slice :" + pa[0..pa.size()-2] groovy> println "13 check :" + pa groovy> pa = pa + ["d"] groovy> println "14 check :" + pa groovy> pa = pa - ["d"] groovy> println "15 check :" + pa groovy> println "16 push :" + pa.push("e") groovy> println "17 check :" + pa 01 check :[a, b, c, d] 02 tail :[b, c, d] 03 check :[a, b, c, d] 04 pop :d 05 check :[a, b, c] 06 head :a 07 check :[a, b, c] 08 index1:b 09 check :[a, b, c] 10 slice :[b, c] 11 check :[a, b, c] 12 slice :[a, b] 13 check :[a, b, c] 14 check :[a, b, c, d] 15 check :[a, b, c] 16 push :true 17 check :[a, b, c, e]
#Command Sequence for Nested Tmux Sessions bind-key a send-prefix
#Aggressive Resize setw -g aggressive-resize on
#縦分割 Ctrl + b, a % #横分割 Ctrl + b, a "
$ ipcalc -n ${IP} $ ipcalc -m ${IP} $ ipcalc -p ${IP} $ ipcalc -b ${IP}
$ ip addr show eth1 | grep inet\ | cut -d' ' -f6 | xargs ipcalc -n NETWORK=172.16.200.0 $ ip addr show eth1 | grep inet\ | cut -d' ' -f6 | xargs ipcalc -m NETMASK=255.255.255.0 $ ip addr show eth1 | grep inet\ | cut -d' ' -f6 | xargs ipcalc -p PREFIX=24 $ ip addr show eth1 | grep inet\ | cut -d' ' -f6 | xargs ipcalc -b BROADCAST=172.16.200.255
$ netstat -ant
$ netstat -anu
sudo nmap -sS ${IP} -p ${fromPort}-${toPort}
$ sudo nmap -sS 192.168.0.1 -p 1-1024
ip addr {add|change|replace} IFADDR dev STRING [ LIFETIME ]
$ ip addr
$ ip addr add 192.168.0.100 dev eth0
$ ip link show
$ ip neigh show
$ ip route
$ ip route add default via 192.168.0.1 $ ip route add 192.168.100.0/24 via 192.168.0.1
DEVICE=eth0 BOOTPROTO=dhcp HWADDR="NN:NN:NN:NN:NN" ONBOOT=yes
DEVICE=eth0 BOOTPROTO=static BROADCAST=192.168.1.255 HWADDR="NN:NN:NN:NN:NN" IPADDR=192.168.0.1 NETMASK=255.255.255.0 NETWORK=192.168.1.0 ONBOOT=yes GATEWAY=192.168.0.1
ubuntu@vertx:~/src$ java -version java version "1.7.0_09" OpenJDK Runtime Environment (IcedTea7 2.3.4) (7u9-2.3.4-0ubuntu1.12.10.1) OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode) ubuntu@vertx:~/src$
$ sudo aptitude install software-properties-common
$ sudo apt-get install add-apt-repository
$ sudo add-apt-repository ppa:webupd8team/java $ sudo apt-get update $ sudo apt-get install oracle-java7-installer
$ sudo update-java-alternatives -s java-7-oracle
ubuntu@vertx:~/src$ java -version java version "1.7.0_13" Java(TM) SE Runtime Environment (build 1.7.0_13-b20) Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode) ubuntu@vertx:~/src$
ubuntu@prx:/etc/apache2$ sudo a2enmod Your choices are: actions alias asis auth_basic auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authnz_ldap authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta cgi cgid charset_lite dav dav_fs dav_loc k dbd deflate dir disk_cache dump_io env expires ext_filter file_cache filter headers ident imagemap include info ldap log_forensic mem_cach e mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http proxy_scgi reqtimeout rewrite setenvif speli ng ssl status substitute suexec unique_id userdir usertrack vhost_alias Which module(s) do you want to enable (wildcards ok)? ubuntu@prx:/etc/apache2$
sudo a2enmod proxy sudo a2enmod proxy_http
$ vim mods-available/proxy.conf <IfModule mod_proxy.c> ProxyRequests Off ProxyPass /hoge/ http://10.0.3.110:8080/ ProxyPassReverse /hoge/ http://10.0.3.110:8080/ </IfModule>
> hg clone https://vim.googlecode.com/hg/ vim > cd vim
> sudo apt-get install -y zlib1g-dev libreadline6-dev ncurses-dev python-dev gcc make
> sudo yum install -y zlib-devel ncurses-devel readline-devel python-devel gcc make
> ./configure --enable-multibyte --with-features=huge --enable-pythoninterp=yes or > ./configure --enable-multibyte --with-features=huge --enable-pythoninterp=yes --enable-fontset --with-python-config-dir=/usr/local/lib/python2.7/config > make > sudo make install
> export GIT_SSL_NO_VERIFY=true > git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
set nocompatible " be iMproved filetype off " required! set rtp+=~/.vim/bundle/vundle/ call vundle#rc() Bundle 'gmarik/vundle' filetype plugin indent on " required!
for(i in 0..10){ hogehoge }
myList = (1..10) def notBreak(yourList) { yourList.each { list -> if(list == 5) { return true } else { return false } } } //assert existFiveBadCase(myList) == true assert notBreak(myList) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
myList = (1..10) def doBreak(yourList) { def isExist = false yourList.find { list -> if(list == 5) { isExist = true return true } } return isExist } assert doBreak(myList) == true
1.9.3-p194 :002 > 1.9.3-p194 :003 > a = "hoge" => "Hello, world" 1.9.3-p194 :004 > a.class => String 1.9.3-p194 :005 > a.class.class => Class 1.9.3-p194 :006 > a.class.class.class => Class 1.9.3-p194 :007 > a.class.class.class.class => Class
1.9.3-p194 :009 > a.class => String 1.9.3-p194 :010 > a.class.superclass => Object 1.9.3-p194 :011 > a.class.superclass.class => Class 1.9.3-p194 :012 > a.class.superclass.superclass => BasicObject 1.9.3-p194 :013 > a.class.superclass.superclass.class => Class 1.9.3-p194 :014 > a.class.superclass.superclass.superclass => nil
1.9.3-p194 :014 > a.class.superclass.superclass.superclass => nil 1.9.3-p194 :015 > a.class.superclass.superclass.superclass.class => NilClass 1.9.3-p194 :016 > a.class.superclass.superclass.superclass.class.superclass => Object 1.9.3-p194 :017 > a.class.superclass.superclass.superclass.class.superclass.class => Class 1.9.3-p194 :018 > a.class.superclass.superclass.superclass.class.superclass.class.superclass => Module 1.9.3-p194 :019 > a.class.superclass.superclass.superclass.class.superclass.class.superclass.class => Class 1.9.3-p194 :020 > a.class.superclass.superclass.superclass.class.superclass.class.superclass.class.superclass => Module 1.9.3-p194 :021 > a.class.superclass.superclass.superclass.class.superclass.class.superclass.class.superclass.class => Class 1.9.3-p194 :022 > a.class.superclass.superclass.superclass.class.superclass.class.superclass.class.superclass.class.superclass => Module 1
----------------------------- インスタンス <= クラス ----------------------------- "hoge" <= String String <= Class nil <= NilClass NilClass <= Class Module <= Class Class <= Class -----------------------------
String -> Object -> Class -> BasicObject -> nil
Class -> Module -> Object -> BasicObject -> nil
1.9.3p362 :017 > String.superclass.superclass.superclass.superclass NoMethodError: undefined method `superclass' for nil:NilClass from (irb):17 from /home/ya-ota/.rvm/rubies/ruby-1.9.3-p362/bin/irb:16:in `' 1.9.3p362 :018 > "hoge".superclass NoMethodError: undefined method `superclass' for "hoge":String from (irb):18 from /home/ya-ota/.rvm/rubies/ruby-1.9.3-p362/bin/irb:16:in `' 1.9.3p362 :019 >
$ sudo yum install python-devel git hg curl $ curl -O http://python-distribute.org/distribute_setup.py $ sudo python distribute_setup.py $ easy_install virtualenv $ virtualenv --no-site-packages myenv $ source ./myenv/bin/activate $ easy_install rhodecode
error: Setup script exited with Python headers are required to build Mercurial
$ paster make-config RhodeCode production.ini Distribution already installed: RhodeCode 1.5.2 from /path/to/lib/python2.6/site-packages/RhodeCode-1.5.2-py2.6.egg Creating production.ini Now you should edit the config files production.ini
$ paster setup-rhodecode production.ini
Enter a valid absolute path to store repositories. All repositories in that path will be added automatically:
mkdir -p /home/user/my_repo paster setup-rhodecode production.ini --user=user --password=Ninni --email=user@yourdomain.com --repos=/home/user/my_repo
paster serve production.ini
EnvironmentError: Subprocess exited due to an error:
$ git clone https://github.com/git/git.git $ cd ./git $ git tag $ git checkout v1.8.?? #<-ここは好きにして
$ sudo yum install -y curl-devel expat-devel openssl-devel gettext
$ sudo yum install perl-ExtUtils-MakeMaker
$ make NO_TCLTK=Yes prefix=/usr/local $ make install $ sudo yum remove git $ source /etc/profile $ git --version
$ vim Makefile prefix = /usr/local
$ git config --system user.email "yourmail@dokkasonohen.jp" $ git config --system user.name "Fistname Lastname"
$ find ./ -name *.py |xargs grep -n4 "todo"
grep -vE "(dummy|127\\.0\\.0\\.1)" access_log
$ tail -f "/var/log/httpd/logs/{access,error}_log
$ watch -n3 "date '+%F %H:%M:%S'"
$ tail -f /var/log/message | grep sshd | tee -a sshd.log
$ date "+%F %H:%M:%S" | tr -d "\n" $ echo -n "hello"
$ watch -n3 "date '+%F %H:%M:%S' | tr -d '\n' >> netstat.log && \ echo -n " = " >> netstat.log && \ netstat -ant | grep "httpd" | wc -l | tee -a netstat.log"
$ cat access_log | cut -d' ' -f4-5,7
$ mv hoge foo -b "bk"