» tagged pages
» logout

sorted by: recent | see : popular
Content Tagged with Shell + PHP

bceval: arbitrary precision math for PHP without extensions

I needed arbitrary precision math in PHP, and wasn’t willing to rebuild PHP to add the bcmath extensions. All hail backticks.

function bceval($expr) {
  return trim(`echo "$expr" | bc`);
}

Used like so

$end = bceval("$start + $batchsize - 1");

Wet cat territory.

Kellan-Elliot-Mcrea: Laughing Meme

phpsh -- an interactive shell for php

"phpsh is an interactive shell for php that features readline history, tab completion, quick access to documentation. It was developed at Facebook and ironically, is written mostly in python. It is open source and released under a modified BSD license."

open-source: del.icio.us tag/open-source

Suddenly I Tee .. or how to log your mysql shell output to a log file

A lot of you may already know this, but I am willing to bet there are more that don’t. I’m talking about the tee command in the bash shell, and in MySQL. For our purposes, we’ll talk about the tee command in MySQL.

Problem: You have a series of SQL statements whose results take up a few screens worth of output, and you need to take this output and send it to someone else (A DBA, MySQL Support, your mentor). You could just do a copy/paste from your terminal, but what if you realized in the end that your scroll back buffer isn’t as large as you thought it was?

Solution: Tee. Apparently, the mysql client comes with tee.

mysqlshell> tee mysqlog.sql ;
Logging to file ‘mysqlog.sql’
use dbname;
select foo from bar;
….
mysqlshell> notee;
quit;
bash> cat mysqlog.sql

This could be filed under “my bag of neat mysql tricks”

PS: Sorry for the K.T Tunstall song reference/joke.. I heard it on Saturday and it’s not leaving my head.

MySQL: Planet MySQL

cURL and libcurl

curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, FILE and LDAP. curl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cooki

XML: del.icio.us/tag/xml

~jk php shell

Nice PHP5 shell by Jan Kneschke, written in... PHP5.

opensource: del.icio.us tag/opensource

phpsh -- an interactive shell for php

"phpsh is an interactive shell for php that features readline history, tab completion, quick access to documentation. It was developed at Facebook and ironically, is written mostly in python. It is open source."

opensource: del.icio.us tag/opensource

phpsh -- an interactive shell for php

phpsh is an interactive shell for php that features readline history, tab completion, quick access to documentation.

opensource: del.icio.us tag/opensource

htsh - Google Code

htsh is an http shell written with php and the jQuery javascript library (making extensive use of AJAX for better responsiveness).

opensource: del.icio.us tag/opensource

~jk php shell

Interactive shell for PHP. Like in Ruby or Python

opensource: del.icio.us tag/opensource

phpsh -- an interactive shell for php

Oddly enough, the only thing I can imagine doing with this is... writing scripts.

opensource: del.icio.us tag/opensource

Page 1 | Next >>