Programmer's Tipshttp://aics-app.sakura.ne.jp/rss_share/201505051430751672664English blog sites, which contain tips help programmingBase64 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 BlogHow to default a column as a UUID/GUID in MySQL
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/Je3KG0GXCyE/
Sun, 29 Nov 2015 23:38:00 GMT<p>MySQL does not yet support setting a column's default value using a function (at least not yet as of version 5.6) but you can use a trigger instead. This post shows how to set a column to a UUID/GUID by default in MySQL using a trigger.</p>Sun, 29 Nov 2015 23:38:00 GMTChris Hope's LAMP BlogEnable & disable WordPress plugins from the command line
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/GowJo6X4hrk/
Thu, 26 Nov 2015 23:00:00 GMT<p>Sometimes installing or upgrading a WordPress plugin breaks both the frontend of your website and the WordPress admin too, making it impossible to disable the plugin with the user interface. If you have command line access, WP-CLI to the rescue!</p>Thu, 26 Nov 2015 23:00:00 GMTChris Hope's LAMP BlogUpdate domains & paths in WordPress with WP-CLI
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/dQzimRK0wuM/
Wed, 25 Nov 2015 23:00:00 GMT<p>If you've ever had to take a copy of a live WordPress install and use it on a development/test server, you'll know it can be difficult updating all the domains and paths that are riddled throughout the database. The WP-CLI command line tool helps to easily solve this problem.</p>Wed, 25 Nov 2015 23:00:00 GMTChris Hope's LAMP BlogBrowser responses to the X-Frame-Options response header
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/1isLP5pLXcQ/
Tue, 24 Nov 2015 23:00:00 GMT<p>The X-Frame-Options response header this morning; it can be used to prevent your website being rendered within a <frame>, <iframe> or <object>. There are different options to either deny access to all websites, allow from the same origin only, and to allow from a specific origin.</p>Tue, 24 Nov 2015 23:00:00 GMTChris Hope's LAMP BlogHow to generate a SAN CSR from the command line
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/qAFLnPYiuMc/
Mon, 23 Nov 2015 23:00:00 GMT<p>SAN Certificates (Subject Alternative Names Certificates) allow you to have multiple domain names on a secure single certificate, which means you can serve up multiple secured domains on a single IP address without using SNI (Server Name Indication). This post shows how to generate the CSR (Certificate Signing Request) for a SAN Certificate.</p>Mon, 23 Nov 2015 23:00:00 GMTChris Hope's LAMP BlogUse a different rsa identity file when using ssh
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/89FfNN-JZgE/
Sun, 22 Nov 2015 23:00:00 GMT<p>You may need to use different identity files when logging into ssh/sftp servers, so this post shows how to specify a different one to use from the command line, and then always using that key by default in the config file.</p>Sun, 22 Nov 2015 23:00:00 GMTChris Hope's LAMP BlogSetting a user's supplementary groups on Linux
http://feedproxy.google.com/~r/ElectricToolboxBlog/~3/uM4D9ZAOKRA/
Sat, 21 Nov 2015 23:00:00 GMT<p>A user on Linux belongs to a primary group, which is specified in the /etc/passwd file, and can be assigned to multiple supplementary groups, which are specific in the /etc/group file. The usermod command can be used after creating to user to assign them to additional groups(s).</p>Sat, 21 Nov 2015 23:00:00 GMTChris Hope's LAMP Blog