 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Michael Maclean: Why one-line installers are a bad idea
by Chris Cornutt September 21, 2012 @ 11:35:29
There's a feature that's usage has been showing up more and more in software projects (both open source and not) that allows you to install their system with a single line command, usually involving curl and maybe piping it to a shell. In this recent post Michael Maclean takes a look at this trend and some of the possible pitfalls of the approach.
There has been a trend in the last while for various bits of useful software to have a one-line shell command recommended as the installation method. The usual form of this is to pipe something like curl or wget to some interpreter, be it bash, php, ruby, or some such. [...] This [type of] command takes the output of curl and pipes it straight to bash. I have several issues with this.
His three main points center around the fact that you cannot inspect the code before executing it with this method, that you can't verify the source of the code and that it teaches users bad habits of trusting in "magic commands" like these.
voice your opinion now!
installer oneline opinion curl bash shell magic
Chris Jones: Using the PHP CLI Webserver to Identify and Test Memory Issues in PHP
by Chris Cornutt August 15, 2012 @ 08:35:07
Chris Jones has a new post today showing how you can use PHP 5.4's built-in web server to help test for memory issues in your application (and the language).
Rasmus mentioned on IRC how he ran the [command line] tests: simply renaming the ".phpt" test files as ".php", and invoking them through the CLI webserver. The SKIPIF sections get executed, but that doesn't affect the desired outcome of testing multiple HTTP requests with different input scripts. [Here] are some quick shell scripts I put together to automate testing the OCI8 extension with valgrind.
He uses the OCI8 extension as an example, showing how to set up these scripts to enable the execution of the tests, fire up the web server and execute Valgrind to help monitor the memory of the execution.
voice your opinion now!
builtin webserver cli test unittest phpt tutorial shell
Gareth Heyes' Blog: Non alphanumeric code in PHP
by Chris Cornutt September 23, 2011 @ 10:05:47
Gareth Heyes has tried out an interesting experiment - running non-alphanumeric code in PHP using only octal escapes.
So a small php shell was tweeted around and it inspired me to investigate a way to execute non-alphanumeric code. First off I started with the idea of using octal escapes in PHP and constructing the escape so for example: 107 is "G" if I could construct the "107" and add the backslash to the beginning maybe I could construct "G".
A snippet of example code is included showing his octal-based code for creating a "G" (6 lines of pluses, parentheses, equals and a few more characters). By doing some trickery with bitwise operators on strings, he was able to combine characters and make the string "GET". Pretty clever, even if it's not entirely practical.
voice your opinion now!
nonalphanumeric code shell loop octal
Casey's Blog: Make Your Life as a PHP Developer Twice as Easy With phpsh
by Chris Cornutt July 05, 2011 @ 11:50:37
In his (Python) blog today Casey reminds the developer community about a handy tool that the developers at Facebook have made available to make a PHP coder's life easier - phpsh.
The developers at Facebook have brought PHP developers a powerful REPL now ala-Python to round out a solid toolbox that PHP developers already have. The project is called phpsh and is written in Python.
He includes the commands you'll need to get it pulled from github and working, providing you with an interactive shell right on your local machine (more powerful than the built-in PHP shell). You can also grab a zip or gzipped archive for download. For complete details on the tool and how to use it, see phpsh.org.
voice your opinion now!
tool phpsh shell interactive facebook python
Jordi Boggiano's Blog: PHP Console in Your Browser
by Chris Cornutt September 24, 2010 @ 11:51:49
Jordi Boggiano has a new post today looking at his PHP console script that works in your browser that sets up easily and works from your localhost web server - php-console.
Since I spend most of my days programming PHP I tend to need that a lot and a few years back I wrote a small script that would let me type php code in my browser and execute it. Nothing fancy, but quite useful. Over the years a few people got interest seeing me use it and asked for the sources, so instead of repackaging it every time, I thought I'd clean it up, polish a bit, add some features, and put it on github.
Setup is as simple as dropping the code somewhere in your local server's document root and offers a textarea for input and a expandable tree for the resulting output. It uses the Krumo tool to create this modified output. You can see a screenshot here.
voice your opinion now!
console browser interactive shell webbased
Teknoid's Blog: A deeper look at working with CakePHP shells
by Chris Cornutt July 15, 2009 @ 09:48:41
On his blog recently teknoid has posted a deeper look at using shells for the CakePHP framework that allow you to quickly make your application usable from the command line.
Why is that a good thing or what is it generally used for? Well, probably the #1 reason to write a shell is to allow certain aspects of your application to be executed by cron (behind the scenes), rather than through human intervention or web interface. [...] The other option is, of course, to be able to automate some mundane tasks... just take a look at the power of "bake".
He's broken things up into a few different categories - a general look at what the shells are and how they can be used, some of the more handy shell methods included by default, how to load in models to get access to your data and, finally, how to call a method from one of your classes.
voice your opinion now!
commandline shell cakephp
Vid Luther's Blog: Using your Mac as a local web development environment.
by Chris Cornutt February 09, 2009 @ 09:32:14
Having a development environment on a remote machine (maybe production, maybe test) is nice, but sometimes you just need the speed and simplicity that something a bit more local can give you. Vid Luther talks about setting up just such a local development environment on your Mac. (Sorry Windows guys - maybe check out WAMP)
This post is for the techies who know me, and are switching. Some are coming from Windows, some from Linux, some are designers who need to do some local development. So, I'll try to keep this post as simple as possible, and perhaps more like a tutorial, where you can "copy and paste" commands and files.
He recommends a few pieces of software that you'll need - things like XAMPP and MySQL - and some other "nice to haves" like TextMate, Subversion and Expandrive. He shows how to set up the shell environment, create virtual hosts and add them into the /etc/hosts file so they'll resolve locally.
voice your opinion now!
mac osx local development environment xampp mysql tutorial shell virthost
|
Community Events
Don't see your event here? Let us know!
|