<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Aknosis.com - Latest Comments</title><link>http://aknosis.disqus.com/</link><description></description><atom:link href="https://aknosis.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Wed, 12 Apr 2017 04:26:50 -0000</lastBuildDate><item><title>Re: Hiding Unnecessary Response Headers Apache/PHP</title><link>http://aknosis.com/2009/10/13/hiding-unnecessary-response-headers-apachephp/#comment-3252242940</link><description>&lt;p&gt;I tried these steps and my Server info stop appearing. Thanks for the steps appreciate your efforts.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Student-help</dc:creator><pubDate>Wed, 12 Apr 2017 04:26:50 -0000</pubDate></item><item><title>Re: Twig cache file permissions - aknosis.com</title><link>http://aknosis.com/2012/10/02/twig-cache-file-permissions/#comment-2425417472</link><description>&lt;p&gt;Very very nice!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Michael Bruce Allen</dc:creator><pubDate>Fri, 25 Dec 2015 01:22:00 -0000</pubDate></item><item><title>Re: Twig cache file permissions - aknosis.com</title><link>http://aknosis.com/2012/10/02/twig-cache-file-permissions/#comment-2172446001</link><description>&lt;p&gt;You save my deployments! Thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">surokeen</dc:creator><pubDate>Mon, 03 Aug 2015 15:37:53 -0000</pubDate></item><item><title>Re: Using jQuery to rewrite relative urls to absolute urls &amp;#8211; [revisited]</title><link>http://aknosis.com/2011/07/17/using-jquery-to-rewrite-relative-urls-to-absolute-urls-revisited/#comment-1977565556</link><description>&lt;p&gt;Additionally I would also expand the original selector from just 'a' to 'a[href]' to exclude any links without an href attribute, as they would error out on value.substr().&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steve De Jonghe</dc:creator><pubDate>Mon, 20 Apr 2015 11:34:13 -0000</pubDate></item><item><title>Re: Quicktip: Check if a class constant exists in PHP</title><link>http://aknosis.com/2011/06/29/check-if-a-class-constant-exists-in-php/#comment-1920462427</link><description>&lt;p&gt;Works great thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Steve Bauman</dc:creator><pubDate>Sat, 21 Mar 2015 18:34:37 -0000</pubDate></item><item><title>Re: Using jQuery to rewrite relative urls to absolute urls &amp;#8211; [revisited]</title><link>http://aknosis.com/2011/07/17/using-jquery-to-rewrite-relative-urls-to-absolute-urls-revisited/#comment-1877398771</link><description>&lt;p&gt;these 2 selectors are redundant&lt;/p&gt;&lt;p&gt;[href^="http"],[href^="https"]&lt;/p&gt;&lt;p&gt;the second one is a subset of the first one so it's ok to remove it&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hugh Anderson</dc:creator><pubDate>Thu, 26 Feb 2015 15:49:29 -0000</pubDate></item><item><title>Re: Using jQuery to rewrite relative urls to absolute urls &amp;#8211; [revisited]</title><link>http://aknosis.com/2011/07/17/using-jquery-to-rewrite-relative-urls-to-absolute-urls-revisited/#comment-1544072011</link><description>&lt;p&gt;Very nice fix. I used this on images instead of link tags. just changed this line&lt;/p&gt;&lt;p&gt;$('a').not('[href^="http"],[href^="https"],[href^="mailto:"],[href^="#"]').each(function() {&lt;/p&gt;&lt;p&gt;to this&lt;/p&gt;&lt;p&gt;$('img').not('[src^="http"], [src^="https"]').each(function() {&lt;/p&gt;&lt;p&gt;and it works like a charm. Thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Benoit Burke</dc:creator><pubDate>Fri, 15 Aug 2014 11:05:43 -0000</pubDate></item><item><title>Re: Twig cache file permissions - aknosis.com</title><link>http://aknosis.com/2012/10/02/twig-cache-file-permissions/#comment-1499199367</link><description>&lt;p&gt;Thanks for not being petty and commenting on my @... anyways, again, great code!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Guest</dc:creator><pubDate>Wed, 23 Jul 2014 00:35:11 -0000</pubDate></item><item><title>Re: Twig cache file permissions - aknosis.com</title><link>http://aknosis.com/2012/10/02/twig-cache-file-permissions/#comment-1498846751</link><description>&lt;p&gt;Yes - but then you are effecting every file / directory creation with that umask and not just the parent directory. The underlying Twig code could change and then all the sudden the umask is applied to much more than expected.&lt;/p&gt;&lt;p&gt;My code is much more explicit in what it's doing so it doesn't create any surprises (of which there may be 0).&lt;/p&gt;&lt;p&gt;I will also not comment on the usage of the @...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Tue, 22 Jul 2014 19:03:37 -0000</pubDate></item><item><title>Re: Twig cache file permissions - aknosis.com</title><link>http://aknosis.com/2012/10/02/twig-cache-file-permissions/#comment-1498807177</link><description>&lt;p&gt;Couldn't your code essentially be refactored down to the following?&lt;/p&gt;&lt;p&gt;$old = umask(0002);&lt;br&gt;        parent::writeCacheFile($file, $content);&lt;br&gt;        umask($old);&lt;br&gt;        @chmod($file, 0775);&lt;/p&gt;&lt;p&gt;This for me works better since the parent method treats errors better i.e. has exception handling, than your method.  Anyways, great research and this article helped me tremendously.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">heylarson</dc:creator><pubDate>Tue, 22 Jul 2014 18:35:42 -0000</pubDate></item><item><title>Re: Twig cache file permissions - aknosis.com</title><link>http://aknosis.com/2012/10/02/twig-cache-file-permissions/#comment-1169014185</link><description>&lt;p&gt;Was helpful for me, thanks!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">sergeylukin</dc:creator><pubDate>Wed, 18 Dec 2013 13:07:40 -0000</pubDate></item><item><title>Re: Twig cache file permissions - aknosis.com</title><link>http://aknosis.com/2012/10/02/twig-cache-file-permissions/#comment-1128051637</link><description>&lt;p&gt;Thank you for sharing your solution! It is useful even after an year has passed since you wrote the article.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Никола Петкански</dc:creator><pubDate>Mon, 18 Nov 2013 08:53:19 -0000</pubDate></item><item><title>Re: More jQuery Fun &amp;#8211; Auto Populating a Select Box</title><link>http://aknosis.com/2009/10/15/more-jquery-fun-auto-populating-a-select-box/#comment-1035622298</link><description>&lt;p&gt;how to autopopulate select using a stored procedure&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">SK</dc:creator><pubDate>Mon, 09 Sep 2013 13:30:20 -0000</pubDate></item><item><title>Re: Twig cache file permissions - aknosis.com</title><link>http://aknosis.com/2012/10/02/twig-cache-file-permissions/#comment-933903285</link><description>&lt;p&gt;This post is really useful. Thanks you!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Hoang</dc:creator><pubDate>Tue, 18 Jun 2013 00:06:32 -0000</pubDate></item><item><title>Re: Using jQuery to rewrite relative urls to absolute urls &amp;#8211; [revisited]</title><link>http://aknosis.com/2011/07/17/using-jquery-to-rewrite-relative-urls-to-absolute-urls-revisited/#comment-690348889</link><description>&lt;p&gt;So very helpful! Thank you soooo much!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Joe</dc:creator><pubDate>Tue, 23 Oct 2012 15:41:04 -0000</pubDate></item><item><title>Re: Apache: How to redirect all root domain traffic to www subdomain - aknosis.com</title><link>http://aknosis.com/2009/10/22/apache-how-to-redirect-all-root-domain-traffic-to-www-subdomain/#comment-632099877</link><description>&lt;p&gt;I don't think you need the RewriteRule for ^index\.php$ - [L], that line looks invalid.&lt;/p&gt;&lt;p&gt;This should work:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;# BEGIN WordPress&lt;br&gt;&amp;lt; ifmodule mod_rewrite.c &amp;gt;&lt;br&gt;RewriteEngine On&lt;br&gt;RewriteCond %{HTTP_HOST} !^www\.demoblog\.com$ [NC]&lt;br&gt;RewriteRule ^(.*)$ http://www.demoblog.com/$1 [R=301,L]&lt;br&gt;RewriteBase /RewriteCond %{REQUEST_FILENAME} !-f&lt;br&gt;RewriteCond %{REQUEST_FILENAME} !-d&lt;br&gt;RewriteRule . /index.php [L]&lt;br&gt;&amp;lt; /ifmodule &amp;gt;&lt;br&gt;# END WordPress&lt;br&gt;&lt;/pre&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Tue, 28 Aug 2012 12:08:20 -0000</pubDate></item><item><title>Re: Apache: How to redirect all root domain traffic to www subdomain - aknosis.com</title><link>http://aknosis.com/2009/10/22/apache-how-to-redirect-all-root-domain-traffic-to-www-subdomain/#comment-631631206</link><description>&lt;p&gt;I have an .htaccess in my wordpress directory pasted below. I want to forward traffic from root domain to www. &lt;/p&gt;&lt;p&gt;# BEGIN WordPress&lt;br&gt;&amp;lt;ifmodule mod_rewrite.c=""&amp;gt;&lt;br&gt;RewriteEngine On&lt;br&gt;RewriteBase /&lt;br&gt;RewriteRule ^index\.php$ - [L]&lt;br&gt;RewriteCond %{REQUEST_FILENAME} !-f&lt;br&gt;RewriteCond %{REQUEST_FILENAME} !-d&lt;br&gt;RewriteRule . /index.php [L]&lt;br&gt;&amp;lt;/ifmodule&amp;gt;&lt;br&gt;# END WordPress&lt;/p&gt;&lt;p&gt;So where i have to change the rules. what about index.php it should be there or not?&lt;/p&gt;&lt;p&gt;Please correct if i am wrong.&lt;/p&gt;&lt;p&gt;# BEGIN WordPress&amp;lt;ifmodule mod_rewrite.c=""&amp;gt;RewriteEngine OnRewriteCond %{HTTP_HOST} !^www\.demoblog\.com$ [NC]&lt;br&gt;RewriteRule ^(.*)$ &lt;a href="http://www.demoblog.com/$1" rel="nofollow noopener" target="_blank" title="http://www.demoblog.com/$1"&gt;http://www.demoblog.com/$1&lt;/a&gt; [R=301,L]RewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]&amp;lt;/ifmodule&amp;gt;# END WordPress&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Vedank Kulshrestha</dc:creator><pubDate>Tue, 28 Aug 2012 01:35:28 -0000</pubDate></item><item><title>Re: Quick Tip: rawurlencode in Twig - My Octopress Blog</title><link>http://aknosis.com/2012/04/10/quick-tip-rawurlencode-in-twig/#comment-553206758</link><description>&lt;p&gt;Nice to know, thanks !&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">neemzy</dc:creator><pubDate>Sat, 09 Jun 2012 12:52:02 -0000</pubDate></item><item><title>Re: Quicktip: Random string in unix</title><link>http://aknosis.com/2011/07/12/quicktip-random-string-in-unix/#comment-492329744</link><description>&lt;p&gt;Or you can apparently use $RANDOM in bash. &lt;br&gt;&lt;a href="http://tldp.org/LDP/abs/html/randomvar.html" rel="nofollow noopener" target="_blank" title="http://tldp.org/LDP/abs/html/randomvar.html"&gt;http://tldp.org/LDP/abs/htm...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Mon, 09 Apr 2012 14:04:36 -0000</pubDate></item><item><title>Re: Using jQuery to rewrite relative urls to absolute urls &amp;#8211; [revisited]</title><link>http://aknosis.com/2011/07/17/using-jquery-to-rewrite-relative-urls-to-absolute-urls-revisited/#comment-355929465</link><description>&lt;p&gt;This should work:&lt;br&gt;$('img').not('[src^="http"],[src^="https"],[href^="data:"]').each(function() {&lt;br&gt;            $(this).attr('src', function(index, value) {&lt;br&gt;                if (value.substr(0,1) !== "/") {&lt;br&gt;                    value = window.location.pathname + value;&lt;br&gt;                }&lt;br&gt;                return "&lt;a href="http://mynewurl.com" rel="nofollow noopener" target="_blank" title="http://mynewurl.com"&gt;http://mynewurl.com&lt;/a&gt;" + value;&lt;br&gt;            });&lt;br&gt;        });&lt;br&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Fri, 04 Nov 2011 15:02:39 -0000</pubDate></item><item><title>Re: Using jQuery to rewrite relative urls to absolute urls &amp;#8211; [revisited]</title><link>http://aknosis.com/2011/07/17/using-jquery-to-rewrite-relative-urls-to-absolute-urls-revisited/#comment-355921788</link><description>&lt;p&gt;Why  this doesnt work for img ? I think problem is not selector with more then one condition in filter. How to do it for img src ?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nemi</dc:creator><pubDate>Fri, 04 Nov 2011 14:53:59 -0000</pubDate></item><item><title>Re: Quicktip: Check if a class constant exists in PHP</title><link>http://aknosis.com/2011/06/29/check-if-a-class-constant-exists-in-php/#comment-331928806</link><description>&lt;p&gt;Glad you found it useful.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Tue, 11 Oct 2011 15:38:39 -0000</pubDate></item><item><title>Re: Quicktip: Check if a class constant exists in PHP</title><link>http://aknosis.com/2011/06/29/check-if-a-class-constant-exists-in-php/#comment-331897148</link><description>&lt;p&gt;Thanks for this!&lt;/p&gt;&lt;p&gt;I used this as part of a regex function within a validation class, allowing me to pass a pattern or the name of a constant containing a pattern to validate a string.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex</dc:creator><pubDate>Tue, 11 Oct 2011 14:57:27 -0000</pubDate></item><item><title>Re: Using jQuery to rewrite relative urls to absolute urls &amp;#8211; [revisited]</title><link>http://aknosis.com/2011/07/17/using-jquery-to-rewrite-relative-urls-to-absolute-urls-revisited/#comment-265872399</link><description>&lt;p&gt;If all you want to do is remove the href before the hash that isn't too tough, but you would need to update the selector based on the context of its use. See: &lt;a href="http://jsfiddle.net/aknosis/c2yaw/" rel="nofollow noopener" target="_blank" title="http://jsfiddle.net/aknosis/c2yaw/"&gt;http://jsfiddle.net/aknosis...&lt;/a&gt;&lt;/p&gt;&lt;p&gt;You may also have to tweak the regex for replacing the href but that code works for the example you have.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Paul Giberson</dc:creator><pubDate>Tue, 26 Jul 2011 17:56:41 -0000</pubDate></item><item><title>Re: Using jQuery to rewrite relative urls to absolute urls &amp;#8211; [revisited]</title><link>http://aknosis.com/2011/07/17/using-jquery-to-rewrite-relative-urls-to-absolute-urls-revisited/#comment-265810215</link><description>&lt;p&gt;Thanks for the post! I'd like to do something similar, but just take out the absolute URL from the href attribute. That is take href="/name1/name2#name3" and make it href="/#name3". Any advice?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Josh</dc:creator><pubDate>Tue, 26 Jul 2011 16:12:06 -0000</pubDate></item></channel></rss>