Page3 of 37 1 2 3 4 5 ... 37
3 05 2011

PHP 创建并让文件强制下载

#bigCat.PHP(" Comment.isBlank ")
<?php
//$name = trim($_SERVER['PATH_INFO'],'/');
//$rs = @file_get_contents('http://miao.in/ipq.php');
$love_filename= $_POST["filename"];
$love_maker= $_POST["content"];

if($love_filename==""){
$love_filename="ooxx.me";
}
if($love_maker==""){
$love_maker="life is like penis, it can be harder \n | http://ooxx.me bigCat";
}
//发送头类型为强制下载
header('Content-type: application/force-download');
//定义二进制传输
header('Content-Transfer-Encoding: Binary');
//定义内容长度
header('Content-length: ' . strlen($love_maker));
//输入文件类型
header('Content-disposition: attachment; filename='.$love_filename);
//输出内容
echo $love_maker;
?>

API: http://code.sh/lab/makelove
post filename 和 content 过来就行了

2 05 2011

隐藏 docky 锚配置 按钮

#bigCat.Linux(" Comment.isBlank ")

http://myinterestingubuntu.blogspot.com/2010/04/remove-docky-anchor.html

 

In OMG! today was posted this tip:

Did you know that very recently Docky added the option to remove the Anchor icon from the dock? Oh yes!

OMG! reader kiwisoup e-mailed me over some instructions that I thought i’d paste here: -

* Press ALT + F2
* Type command “gconf-editor" and hit enter/return
* Navigate to "apps/docky-2/docky/items/DockyItem" in the gconf-editor
* Uncheck "ShowDockyItem"
* Restart Docky

Et voilà! Anchor free Docky!

Terminal way
If you're lazy and want to do this via the terminal you can do so using the following commands. (Thanks to commenter dRewsus)

this command will turn the icon off:

* gconftool-2 --type Boolean --set /apps/docky-2/Docky/Items/DockyItem/ShowDockyItem False

this will turn it back on:

* gconftool-2 --type Boolean --set /apps/docky-2/Docky/Items/DockyItem/ShowDockyItem True

Remember that you will need to restart Docky to see the changes.

1 05 2011

设置 / 更改 / 重置 MySQL root 密码 Ubuntu Linux

#bigCat.Linux, PHP(" Comment.isBlank ")

http://ubuntu.flowconsult.at/en/mysql-set-change-reset-root-password/

 

Tested on
- Ubuntu Linux 7.10 Gutsy Gibbon and MySQL 5.0.45. (2007-10-21)
- Ubuntu Linux 6.06 Dapper Drake and MySQL 4.1.15.

Set / change / reset the MySQL root password on Ubuntu Linux. Enter the following lines in your terminal.

  1. Stop the MySQL Server.
    sudo /etc/init.d/mysql stop
  2. Start the mysqld configuration.
    sudo mysqld --skip-grant-tables &
  3. Login to MySQL as root.
    mysql -u root mysql
  4. Replace YOURNEWPASSWORD with your new password!
    UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;

Note: This method is not regarded as the securest way of resetting the password. However it works.

References

MySQL 5.0 Reference Manual: How to Reset the Root Password

30 04 2011

Install Sun Java Runtime (JRE) in Ubuntu 11.04 via PPA

#bigCat.Linux(" for Comments = 3 ")

http://www.liberiangeek.net/2011/04/install-java-run-time-jre-ubuntu-11-04-ppa/

Ubuntu Maverick Image

This simple tutorial shows you how to install Sun Java Runtime Environment (JRE) in Ubuntu 11.04 Natty Narwhal via PPA. If you have upgraded to Ubuntu 11.04 and Java is not installed, follow this tutorial to install it. Java is normally installed via Ubuntu Partner repository, but at the time of this writing, Ubuntu Partner repository wasn’t available in Natty. This is a work-around and should get you the latest version of Java in Ubuntu.

 

Getting started:

 

To get started, click on ‘Power –> System Settings’

 

natty_java_5

 

Next, select ‘System –> Ubuntu Software Center’

 

natty_java_1_3

 

Then select ‘Edit –> Software Sources’

 

natty_java_2_3

 

Next, select ‘Other Software’ and click ‘Add’. Then type type line below into the box and click ‘Add Source’

ppa:ferramroberto/java

natty_java_3_3

 

Back into Software Center search for and install ‘sun-java6-jre’

sun-java6-jre

natty_java_4_3

 

Enjoy!

29 04 2011

How to get over 'premature end of script headers' in Apache?

#bigCat.Linux, PHP(" Comment.isBlank ")

http://www.perlmonks.org/?node_id=24447

:set fileformat:unix
Page3 of 37 1 2 3 4 5 ... 37
Host: (miao) | Word: Press | Code: bigCat | Valid: HTML5