httpd.conf の中に、
AddType application/x-httpd-php .php .htmlって感じでAddTypeに.htmlの拡張子を追加
基本的には技術メモです。
AddType application/x-httpd-php .php .htmlって感じでAddTypeに.htmlの拡張子を追加
$ vi ~/.ssh/config
Host * ServerAliveInterval 120
$ sudo dscacheutil -flushcache
/etc/my.cnfの、
skip-grant-tablesを追加
$ sudo /etc/init.d/mysqld start $ mysql -uroot mysql
mysql> UPDATE user SET Password=PASSWORD('hogehogehoge') WHERE User='root'; mysql> FLUSH PRIVILEGES;
skip-grant-tablesをコメントアウト
$ sudo /etc/init.d/mysqld restart
javascript: function getSelectedTextAndReplace() { IE='\v'=='v'; var SelectedText; if(IE) { var objSelectedText = document.selection; var objTextRange = objSelectedText.createRange(); if (document.selection.createRange().text.length == 0) { return; } try { SelectedText = objTextRange.text; objTextRange.text = strToBloggerCodeTag(SelectedText); } catch (e){ } } else { SelectedText = window.getSelection().toString(); var obj = document.getElementById("postingHtmlBox"); var ns = obj.selectionStart; var ne = obj.selectionEnd; var nl; if ( ns != ne ) { var txt = strToBloggerCodeTag(SelectedText); txt = obj.value.substring(0, ns) + txt + obj.value.substring(ne,obj.value.length); obj.value = txt; obj.setSelectionRange(ns,ns+nl); } } } function strToBloggerCodeTag(str) { return "<pre class=\"prettyprint\">\n" + escapeHTML(str) + "\n</pre>"; } function escapeHTML(strTarget){ var div = document.createElement('div'); var text = document.createTextNode(''); div.appendChild(text); text.data = strTarget; return div.innerHTML; } getSelectedTextAndReplace(); void(0);
javascript: function getSelectedTextAndReplace() { IE='\v'=='v'; var SelectedText; if (IE) { SelectedText = document.selection.createRange().text; } else { SelectedText = window.getSelection().toString(); } alert (strToBloggerCodeTag(SelectedText)); } function strToBloggerCodeTag(str) { return "<pre class=\"prettyprint\">\n" + escapeHTML(str) + "\n</pre>"; } function escapeHTML(strTarget){ var div = document.createElement('div'); var text = document.createTextNode(''); div.appendChild(text); text.data = strTarget; return div.innerHTML; } getSelectedTextAndReplace(); void(0);
javascript: function getSelectedTextAndReplace() { IE='\v'=='v'; var SelectedText; if (IE) { SelectedText = document.selection.createRange().text; } else { SelectedText = window.getSelection().toString(); } alert (strToBloggerCodeTag(SelectedText)); } function strToBloggerCodeTag(str) { str = replaceAll(str, "<", "<"); str = replaceAll(str, ">", ">"); str = replaceAll(str, "<", "&lt;"); str = replaceAll(str, ">", "&gt;"); return "<pre class=\"prettyprint\">\n" + str + "\n</pre>"; } function replaceAll(expression, org, dest){ return expression.split(org).join(dest); } getSelectedTextAndReplace(); void(0);
Redirect permanent / "http://hogehoge.com"
<script src="http://www.google.com/jsapi"></script> <script> // Load prototype 1.6 google.load("prototype", "1.6"); google.setOnLoadCallback(function(){ // ここにページロード時の処理を書く }); </script>
$ su - $ /usr/sbin/useradd kasahi $ passwd kasahi $ /usr/sbin/visudo -> rootに追加 --------------- ## Allow root to run any commands anywhere root ALL=(ALL) ALL kasahi ALL=(ALL) ALL ---------------
$ su - $ mkdir pkg $ cd pkg $ wget http://www.sudo.ws/sudo/dist/sudo-1.6.9p20.tar.gz $ tar xvf sudo-1.6.9p20.tar.gz $ cd sudo-1.6.9p20 $ ./configure $ cp /etc/pam.d/sudo ~/sudo_bak (※一応バックアップ) $ cp sample.pam /etc/pam.d/sudo cp: `/etc/pam.d/sudo' を上書きしてもよろしいですか(yes/no)? yes $ make $ make install
$ sudo yum update
$ sudo yum install zsh
$ mysqldump {$db_name} -u{$user_name} -p{$password} -h{$host_ip} --opt > db_`date +%Y%m%d%H%M%S`.dump
$ mysql -u{$user_name} -p{$password} -h{$host_ip} {$to_insert_db_name} < db_**********.dump
# Backup DB 0 5 * * * /usr/bin/mysqldump {$db_name} -u{$user_name} -p{$password} -h {$host_ip} --opt > {$backup_dir}/db_`date +\%Y\%m\%d\%H\%M\%S`.dump 0 6 * * * /usr/bin/find {$backup_dir} -maxdepth 1 -type f -mtime +7 | /usr/bin/xargs /bin/rm
$ tail -f /var/log/cron