Category: Programming
I still got sites running Apache, but all new projects are launched with Nginx. I don't need many of the features that Apache offers, and the speed gain of Nginx is just tremendous. Once you've experienced it, I doubt you'll want to go back.
At our company we have a lot of uses for a solid API. We can use it to distribute config files, have servers report in, let customers edit DNS records using their own interface, etc. Now that I'm converting all of our legacy code to a big CakePHP application, the API needed a revisit as well. I chose to use REST as a standard, read about everything related to Cake & REST, and started hacking on a reusable plugin. The idea is that you can drop it in any application and unlock existing functionality to REST with minimal changes to your code.
The core of our new project runs on Node.js. With Node you can write very fast JavaScript programs serverside. It's pretty easy to install Node, code your program, and run it. But how do you make it run nicely in the background like a true server?
When migrating projects over to GitHub, I found there were still some passwords inside my SVN repositories. Obviously it's not good practice to store your passwords in a code repository - let alone at a remote location, so I wanted to replace all passwords. Not only in the current version, but in all commits that have been made over the past 3 years. Luckily with Git - you can.
Hi. Have you met KvzHTML? It's a standalone PHP Class for generating HTML. It's been hiding deep inside the caverns of my secret GitHub repo: kvzlib - a collection of code snippets too small or unfinished to deserve their own repository. But I find working with this class so pleasant, I thought I'd share the fun.
This is a Javascript version of the PHP function: money_format.
This is a Javascript version of the PHP function: metaphone.
This is a Javascript version of the PHP function: stream_get_line.
This is a Javascript version of the PHP function: stream_is_local.
This is a Javascript version of the PHP function: stream_context_set_params.
This is a Javascript version of the PHP function: stream_get_contents.
This is a Javascript version of the PHP function: stream_context_set_option.
This is a Javascript version of the PHP function: stream_context_set_default.
This is a Javascript version of the PHP function: stream_context_get_params.
This is a Javascript version of the PHP function: stream_context_get_options.
This is a Javascript version of the PHP function: stream_context_get_default.
This is a Javascript version of the PHP function: stream_context_create.
This is a Javascript version of the PHP function: version_compare.
This is a Javascript version of the PHP function: set_include_path.
This is a Javascript version of the PHP function: restore_include_path.
This is a Javascript version of the PHP function: get_include_path.
This is a Javascript version of the PHP function: get_extension_funcs.
This is a Javascript version of the PHP function: i18n_loc_set_default.
This is a Javascript version of the PHP function: i18n_loc_get_default.
This is a Javascript version of the PHP function: forward_static_call_array.
This is a Javascript version of the PHP function: forward_static_call.
This is a Javascript version of the PHP function: escapeshellarg.
This is a Javascript version of the PHP function: user_error.
This is a Javascript version of the PHP function: trigger_error.
This is a Javascript version of the PHP function: error_reporting.
This is a Javascript version of the PHP function: error_get_last.
This is a Javascript version of the PHP function: class_alias.
This is a Javascript version of the PHP function: array_replace_recursive.
This is a Javascript version of the PHP function: array_replace.
Today I've moved all of my SVN repositories over to GitHub. 5 private reps and 4 public ones. Two of which you may know: PHP.JS and System_Daemon.
PHP 5.3 is a big leap forward for PHP and brings of a lot of neat features. However, big leaps can also mean big changes and potentially big breakage when it comes to backwards compatibiltiy.
I did some experimenting with running a big legacy application and a CakePHP application on PHP 5.3 and would like to share my findings with you. Here are a couple of tips to prepare your code for PHP 5.3
Looking back at a great CakeFest in Berlin, I learned a lot about CakePHP and met many nice and inspiring people. Here are some conference notes I took that where particularly useful or new to me.
IDs are often numbers. Unfortunately there are only 10 digits to work with, so if you have a lot of records, IDs tend to get very lengthy. For computers that's OK. But human beings like their IDs as short as possible. So how can we make IDs shorter? Well, we could borrow characters from the alphabet as have them pose as additional numbers.... Alphabet to the rescue!
If you are in IT professionally (coding or sysadmin) you will be staring at monospaced fonts for many many hours a day. So it's probably justified to spend 2 minutes picking a very good one. It can make your work (typing ; ) just a little bit more pleasing.
This is a Javascript version of the PHP function: var_dump.
This is a Javascript version of the PHP function: is_unicode.
This is a Javascript version of the PHP function: is_resource.
This is a Javascript version of the PHP function: is_buffer.
This is a Javascript version of the PHP function: is_binary.
This is a Javascript version of the PHP function: get_resource_type.
This is a Javascript version of the PHP function: substr_replace.
This is a Javascript version of the PHP function: substr_compare.
This is a Javascript version of the PHP function: str_word_count.
This is a Javascript version of the PHP function: str_getcsv.
This is a Javascript version of the PHP function: quoted_printable_encode.
This is a Javascript version of the PHP function: quoted_printable_decode.
This is a Javascript version of the PHP function: nl_langinfo.
This is a Javascript version of the PHP function: localeconv.
This is a Javascript version of the PHP function: convert_uuencode.
This is a Javascript version of the PHP function: runkit_superglobals.
This is a Javascript version of the PHP function: runkit_method_remove.
This is a Javascript version of the PHP function: runkit_method_rename.
This is a Javascript version of the PHP function: runkit_method_redefine.
This is a Javascript version of the PHP function: runkit_method_copy.
This is a Javascript version of the PHP function: runkit_method_add.
This is a Javascript version of the PHP function: runkit_import.
This is a Javascript version of the PHP function: runkit_function_rename.
This is a Javascript version of the PHP function: runkit_function_remove.
This is a Javascript version of the PHP function: runkit_function_redefine.
This is a Javascript version of the PHP function: runkit_function_copy.
This is a Javascript version of the PHP function: runkit_function_add.
This is a Javascript version of the PHP function: runkit_class_adopt.
This is a Javascript version of the PHP function: runkit_class_emancipate.
This is a Javascript version of the PHP function: sql_regcase.
This is a Javascript version of the PHP function: deaggregate.
This is a Javascript version of the PHP function: preg_grep.
This is a Javascript version of the PHP function: aggregation_info.
This is a Javascript version of the PHP function: aggregate_properties_by_regexp.
This is a Javascript version of the PHP function: aggregate_properties_by_list.
This is a Javascript version of the PHP function: aggregate_properties.
This is a Javascript version of the PHP function: aggregate_methods_by_regexp.
This is a Javascript version of the PHP function: aggregate_methods_by_list.
This is a Javascript version of the PHP function: aggregate_methods.
This is a Javascript version of the PHP function: aggregate_info.
This is a Javascript version of the PHP function: aggregate.
This is a Javascript version of the PHP function: gopher_parsedir.
This is a Javascript version of the PHP function: set_time_limit.
This is a Javascript version of the PHP function: phpversion.
This is a Javascript version of the PHP function: php_ini_scanned_files.
This is a Javascript version of the PHP function: php_ini_loaded_file.
This is a Javascript version of the PHP function: ini_restore.
This is a Javascript version of the PHP function: ini_get_all.
This is a Javascript version of the PHP function: ini_alter.
This is a Javascript version of the PHP function: getlastmod.
This is a Javascript version of the PHP function: get_required_files.
This is a Javascript version of the PHP function: get_defined_constants.
This is a Javascript version of the PHP function: get_cfg_var.
This is a Javascript version of the PHP function: assert_options.
This is a Javascript version of the PHP function: register_shutdown_function.
This is a Javascript version of the PHP function: realpath.
This is a Javascript version of the PHP function: readfile.
This is a Javascript version of the PHP function: fpassthru.
This is a Javascript version of the PHP function: filemtime.
This is a Javascript version of the PHP function: set_exception_handler.
This is a Javascript version of the PHP function: restore_exception_handler.
This is a Javascript version of the PHP function: gmstrftime.
This is a Javascript version of the PHP function: gmmktime.
This is a Javascript version of the PHP function: gettimeofday.
This is a Javascript version of the PHP function: date_parse.
This is a Javascript version of the PHP function: ctype_xdigit.
This is a Javascript version of the PHP function: ctype_upper.
This is a Javascript version of the PHP function: ctype_space.
This is a Javascript version of the PHP function: ctype_punct.
This is a Javascript version of the PHP function: ctype_print.
This is a Javascript version of the PHP function: ctype_lower.
This is a Javascript version of the PHP function: ctype_graph.
This is a Javascript version of the PHP function: ctype_digit.
This is a Javascript version of the PHP function: ctype_cntrl.
This is a Javascript version of the PHP function: ctype_alnum.
This is a Javascript version of the PHP function: ctype_alpha.
This is a Javascript version of the PHP function: classkit_method_rename.
This is a Javascript version of the PHP function: classkit_method_redefine.
This is a Javascript version of the PHP function: classkit_method_remove.
This is a Javascript version of the PHP function: classkit_method_copy.
This is a Javascript version of the PHP function: classkit_method_add.
This is a Javascript version of the PHP function: classkit_import.
This is a Javascript version of the PHP function: array_multisort.
Pictures say more than a thousand words. This is true for your data as well. With Google Chart you can now easily generate charts of your data. No expertise required. Just make sure you format your data correctly, add it to the Google Chart URL, and it will return a nice graph.
This is a Javascript version of the PHP function: setlocale.
This is a Javascript version of the PHP function: strftime.
This is a Javascript version of the PHP function: localtime.
This is a Javascript version of the PHP function: date_default_timezone_set.
This is a Javascript version of the PHP function: date_default_timezone_get.
This is a Javascript version of the PHP function: timezone_identifiers_list.
With all the abstraction layers between code & database, and now with my recent CakePHP adventures: The need for writing SQL statements deminishes. But over the years I've developed my own way of formatting them. And before I'll have to wave queries goodbye forever ;) I just want to put it out there.
If you've written a PEAR package, it's probably a good idea to submit some end user documentation. Here's how to do it.
This is a Javascript version of the PHP function: is_callable.
This is a Javascript version of the PHP function: timezone_abbreviations_list.
This is a Javascript version of the PHP function: get_declared_classes.
This is a Javascript version of the PHP function: import_request_variables.
This is a Javascript version of the PHP function: get_object_vars.
This is a Javascript version of the PHP function: get_class_vars.
This is a Javascript version of the PHP function: get_class_methods.
This is a Javascript version of the PHP function: time_sleep_until.
This is a Javascript version of the PHP function: time_nanosleep.
So I've been learning CakePHP the last few days. Bit by bit I've been trying to port a lecagy admininistration app to Cake. 'Secretly' linking menuitems to finished Cake parts as we go. And I must say: I'm pretty excited. I did run into a disturbing conclusion though. I estimated the legacy app will have over 300 Models & Controllers once finished. That could easily add up to (300 x 4 =) 1200 views. And here I am, creating a maintenance hell while trying to solve one!
This is a Javascript version of the PHP function: doubleval.
This is a Javascript version of the PHP function: parse_url.
This is a Javascript version of the PHP function: php_strip_whitespace.
This is a Javascript version of the PHP function: strnatcasecmp.
This is a Javascript version of the PHP function: natcasesort.
This is a Javascript version of the PHP function: json_encode.
This is a Javascript version of the PHP function: json_decode.
This is a Javascript version of the PHP function: rawurlencode.
This is a Javascript version of the PHP function: rawurldecode.
This is a Javascript version of the PHP function: get_meta_tags.
This is a Javascript version of the PHP function: array_uintersect_uassoc.
This is a Javascript version of the PHP function: array_uintersect_assoc.
This is a Javascript version of the PHP function: array_udiff_uassoc.
This is a Javascript version of the PHP function: array_udiff_assoc.
This is a Javascript version of the PHP function: array_udiff.
This is a Javascript version of the PHP function: array_intersect_ukey.
This is a Javascript version of the PHP function: array_intersect_uassoc.
This is a Javascript version of the PHP function: array_diff_ukey.
This is a Javascript version of the PHP function: array_diff_uassoc.
This is a Javascript version of the PHP function: array_uintersect.
This is a Javascript version of the PHP function: array_intersect_key.
This is a Javascript version of the PHP function: array_intersect_assoc.
This is a Javascript version of the PHP function: array_intersect.
Everyone knows PHP can be used to create websites. But it can also be used to create desktop applications and commandline tools. And now with a class called System_Daemon, you can even create daemons using nothing but PHP. And did I mention it was easy?
This is a Javascript version of the PHP function: vsprintf.
This is a Javascript version of the PHP function: str_shuffle.
This is a Javascript version of the PHP function: setrawcookie.
This is a Javascript version of the PHP function: pathinfo.
This is a Javascript version of the PHP function: get_defined_vars.
This is a Javascript version of the PHP function: strtotime.
This is a Javascript version of the PHP function: call_user_func.
This is a Javascript version of the PHP function: property_exists.
This is a Javascript version of the PHP function: method_exists.
This is a Javascript version of the PHP function: class_exists.
This is a Javascript version of the PHP function: get_defined_functions.
This is a Javascript version of the PHP function: func_num_args.
This is a Javascript version of the PHP function: func_get_args.
This is a Javascript version of the PHP function: func_get_arg.
This is a Javascript version of the PHP function: array_splice.
This is a Javascript version of the PHP function: is_scalar.
This is a Javascript version of the PHP function: is_integer.
This is a Javascript version of the PHP function: is_float.
This is a Javascript version of the PHP function: is_double.
This is a Javascript version of the PHP function: microtime.
This is a Javascript version of the PHP function: get_headers.
This is a Javascript version of the PHP function: quotemeta.
This is a Javascript version of the PHP function: constant.
Writing code requires two important things: creativity & discipline. The creativity to create the unknown, unexplored, exciting parts of software. And the discipline to create the dull & all-too-well-known parts of software / documentation.
You may come up with new ways (or use frameworks) to reduce repetitive work. Effectively beating discipline with creativity. But boring stuff will still always be there in some form. And on days when creativity is low, you may need to tap into that jar of discipline so you can still be productive, by doing things you never feel like.
But every now & then, there is a day when bot...
This is a Javascript version of the PHP function: chunk_split.
This is a Javascript version of the PHP function: array_merge_recursive.
This is a Javascript version of the PHP function: array_merge.
This is a Javascript version of the PHP function: array_filter.
This is a Javascript version of the PHP function: array_fill_keys.
This is a Javascript version of the PHP function: filesize.
This is a Javascript version of the PHP function: file_exists.
This is a Javascript version of the PHP function: array_slice.
This is a Javascript version of the PHP function: get_html_translation_table.
One error that has bugged my Eclipse PDT for a long time, was org.eclipse.emf.ecore.util.EcoreEMap $DelegateEObjectContainmentEList. A vague error, not much to go on, not many hits on google either. Turned out it had to do with the version of my Java Runtime Environment I was using.
Hi folks. As you may or may not know, I have a love/hate relationship with my IDE: Eclipse PDT. For times and times we get along well. But once every while it gets messed up, and it's a pain to straighten it out again. Or at least, it was.
This is a Javascript version of the PHP function: mt_getrandmax.





