Programmer's Tipshttp://aics-app.sakura.ne.jp/rss_share/201505051430751672664English blog sites, which contain tips help programmingShow only one process with top on Linux
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/_jQZYeLdKDY/
Thu, 10 Mar 2016 00:44:00 GMT<p>Top is a useful command line tool for showing processes running on Linux such as how much CPU and memory they've been using and how long they've been running, and also showing the system load, CPU and memory usage as a whole. But what if you only one to show output for one process or command?</p>
Thu, 10 Mar 2016 00:44:00 GMTChris Hope's LAMP BlogChange the commit message with git
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/NUwp4x5SsvY/
Sun, 28 Feb 2016 21:48:21 GMT<p>I'm sure you've done it before: added a commit message with git but typed it in wrong and need to change it. If you haven't pushed the commit yet then it's as simple as 'git commit --amend -m "New commit message"'.</p>
Sun, 28 Feb 2016 21:48:21 GMTChris Hope's LAMP BlogPossible responses from Sendy's subscribe API call
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/I1Ms3pGE_Rw/
Thu, 25 Feb 2016 01:22:03 GMT<p>Sendy is a self-hosted email marketing tool; while hooking up a subscription form, I needed to work out what all the possible responses are to a user subscribing, depending on their current status in the Sendy database.</p>
Thu, 25 Feb 2016 01:22:03 GMTChris Hope's LAMP BlogWhere did "Save for Web" go in Adobe Photoshop?
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/xQQkG24xzvk/
Tue, 23 Feb 2016 01:30:00 GMT<p>Save for Web in Adobe Photoshop CC 2015 was moved on the menus from File -> Save for Web to File -> Export -> Save for Web (Legacy).</p>
Tue, 23 Feb 2016 01:30:00 GMTChris Hope's LAMP BlogView the message header and body for an email in the exim mail queue
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/CTXPYrQhf8c/
Fri, 12 Feb 2016 01:08:00 GMT<p>You've checked to see what's sitting in the exim mail queue, but want to check the email's header and/or body before deleting it from the queue. Use the -Mvh & -Mvb flags to view these.</p>
Fri, 12 Feb 2016 01:08:00 GMTChris Hope's LAMP BlogRamNode cheap virtual servers
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/N2sv9mpo0tY/
Sat, 06 Feb 2016 03:31:00 GMT<p>I needed a really cheap standalone virtual server to test some stuff, on the internet and not running behind a VDSL router at my office, and got the cheapest RamNode server for $13.50 for a whole year.</p>
Sat, 06 Feb 2016 03:31:00 GMTChris Hope's LAMP Blognslookup: command not found error on Debian
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/NGeDZtS0PaA/
Thu, 04 Feb 2016 19:10:37 GMT<p>If you need to use nslookup on a Debian server and you're getting an "nslookup: command not found" then use apt-get to install dnsutils.</p>
Thu, 04 Feb 2016 19:10:37 GMTChris Hope's LAMP BlogBase64 decode from the command line
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/qNc7xwZ2fuM/
Wed, 16 Dec 2015 23:00:00 GMT<p>The base64 command is used to encode and decode data to and from base64. This post shows how to decode base64 data in a file and when copying and pasting.</p>Wed, 16 Dec 2015 23:00:00 GMTChris Hope's LAMP BlogInstall Java on the command line with Debian
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/ggIeMg8sZPE/
Tue, 15 Dec 2015 22:26:00 GMT<p>If it was nice and intuitive to install Java on Debian (and other Debian based distros such as Ubuntu), I wouldn't need to write this post because it would just be "apt-get install java". But no, I always forget what I need to install, hence this post...</p>Tue, 15 Dec 2015 22:26:00 GMTChris Hope's LAMP BlogDiscard mail with exim4 using :blackhole:
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/61MxDkJ9qAE/
Tue, 15 Dec 2015 02:45:00 GMT<p>The most obvious way to discard mail to a particular alias with the exim4 mail server is to send it to /dev/null, but unless file_transport is set in the exim configuration it won't work. You can use :blackhole: instead.</p>Tue, 15 Dec 2015 02:45:00 GMTChris Hope's LAMP BlogWork out PHP's error reporting from an integer value
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/ZnCYHaLX1As/
Mon, 14 Dec 2015 02:58:00 GMT<p>This post has some example PHP code which can be used to work out which error_reporting levels are reported and which are not from an integer value.</p>Mon, 14 Dec 2015 02:58:00 GMTChris Hope's LAMP BlogImplement placeholders in IE8 & 9 (and other older browsers) with jQuery
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/UpBAcM8Acl8/
Wed, 09 Dec 2015 23:05:00 GMT<p>HTML5 saw the introduction of the very useful placeholder attribute for input elements, but it's not supported in Internet Explorer before version 10. There are still a number of people out there with version 8 &amp; 9 but fortunately there are some ways to support placeholders in these older browsers with Javascript.</p>Wed, 09 Dec 2015 23:05:00 GMTChris Hope's LAMP BlogGoogle remarketing tag iframe height issue
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/tcUsdmkbjgk/
Tue, 08 Dec 2015 23:00:00 GMT<p>Google's remarketing code inserts an iframe (with no content) directly below the opening <body> tag, which is 300x13px and can throw out a website's layout. This post looks at how to effectively hide it with CSS in a couple of different ways that hopefully shouldn't mess with its functionality at all.</p>Tue, 08 Dec 2015 23:00:00 GMTChris Hope's LAMP BlogSend CSV data to the browser from MySQL & PHP with fputcsv
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/cdT4fEYGKgE/
Mon, 07 Dec 2015 22:09:00 GMT<p>I covered <a href="http://www.electrictoolbox.com/php-fputcsv-without-file/">how to use PHP's fputcsv without writing to a file</a> in yesterday's post and look at a practical example today: fetching data from MySQL using PDO and sending it to the browser as a CSV, using the fputcsv() function.</p>Mon, 07 Dec 2015 22:09:00 GMTChris Hope's LAMP BlogUse PHP's fputcsv without writing to a file
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/0ASMxTSi8ZY/
Sun, 06 Dec 2015 23:00:00 GMT<p>PHP's fputcsv function is very useful for creating CSV files, but by default will write out to a file. There are a couple of tricks to be able to keep it all in memory or instead write the CSV data out directly to the web browser without having to write your own custom functions.</p>Sun, 06 Dec 2015 23:00:00 GMTChris Hope's LAMP BlogCount rows and columns with Excel
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/AbivInrjXfs/
Fri, 04 Dec 2015 23:00:00 GMT<p>Want to count rows and/or columns in a range with Excel no matter what content they contain? This post shows you how.</p>Fri, 04 Dec 2015 23:00:00 GMTChris Hope's LAMP BlogDid you run git update-server-info on the server?
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/b0CNR2hajFU/
Thu, 03 Dec 2015 23:00:00 GMT<p>This post looks at the error "fatal: https://domain/project/filename-plates.git/info/refs not found: did you run git update-server-info on the server?" when trying to access a git repository.</p>Thu, 03 Dec 2015 23:00:00 GMTChris Hope's LAMP BlogLocale issues with Zend Lucene search
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/tTZxIvfPDtk/
Wed, 02 Dec 2015 23:00:00 GMT<p>We use Zend Lucene Search on a PHP ecommerce website and ran into some issues where records added to the search index from the website interface weren't the same as when created from the command line. It turned out to be a locale issue and setting the locale fixed the problem.</p>Wed, 02 Dec 2015 23:00:00 GMTChris Hope's LAMP BlogSetting a column as a UUID/GIUD in MySQL - replication safe
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/ATGKXpquh0o/
Tue, 01 Dec 2015 23:00:00 GMT<p>I recently looked at <a href="http://www.electrictoolbox.com/mysql-guid-uuid-default-column/">how to default a column as a UUID/GUID in MySQL</a> using a trigger, but it's not replication safe when using statement based replication. This post looks at an alternative to using triggers by using a variable instead.</p>Tue, 01 Dec 2015 23:00:00 GMTChris Hope's LAMP BlogHow to show a MySQL warning that just happened
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/s1IhWOuJ9I4/
Mon, 30 Nov 2015 23:00:00 GMT<p>You've just run a query in MySQL and it tells you "Query OK, 1 row affected, 1 warning (0.01 sec)" but not what the warning is, so how do you know what the warning was for the query that was just run?</p>Mon, 30 Nov 2015 23:00:00 GMTChris Hope's LAMP Blog