Just released a new WordPress plugin:
Views Output Formats
It lets you export your WordPress data in XML and JSON formats easily, and integrates with the Toolset Views plugin.
Just released a new WordPress plugin:
Views Output Formats
It lets you export your WordPress data in XML and JSON formats easily, and integrates with the Toolset Views plugin.
I love working with technology. Every day you are treated to new and exciting challenges, and their solutions.
Lately, I have been keeping a snippet journal. As the name entails, it consists of short snippets that solve a specific task – anything from listing the content of a zip file to working with GeoIP in PHP.
I’m really enjoying the concept. It’s easy to make multiple posts per day and my recollection of the solutions has improved vastly – and if memory fails, there’s always that journal entry!
This blog will continue as is – slightly dormant. Larger announcements and news here will still be posted here, but for my day-to-day interactions with technology, I have the trusted snippet journal!
Have you been doing something similar? Leave a comment!
A new version of Distraction Free Writing mode Themes plugin for WordPress is out!
Make sure to check out the plugin announcement in case you missed it.
Here are the new themes:
Sophisticated and clean theme with a monospaced font.
Based on Ulysses text editor.
Calming dark blue hues. Perfect for writing into the small hours of the night.
Based on the dark Zen Writing mode on GitHub.
Make your own themes!
Use the Custom setting to write your own theme! If you’ve made a nice theme – create a topic in the support forum to have it included in an upcoming version!
Compatibility with other plugins is improved by applying some !important overrides.
Next version will see a Gallery-like mode for selecting your theme, so that you can get a better glance at all the themes at once.
A long-term goal is the ability to create your own theme using color pickers, as well as the ability of saving multiple custom themes.
Until next time:
Distraction Free Writing mode Themes is a WordPress plugin I’ve been working for the past couple of weeks – it provides themes/color schemes for for Distraction Free Writing mode in WordPress. You can use one of the built-in themes or write your own with CSS.
As someone who uses a dark color scheme for programming I didn’t like the default color scheme in WordPress (black text on white background).
The plugin has six themes in total. The default theme is based on Monokai:
Screenshots of the different themes available:
I was looking through Hacker News today, and upon clicking one of the links a screen popped up, pictured below:
This is interesting. What kind of technique does CloudFlare employ to detect potential DDOS attacks inside the browser?
The answer turned out to be simple – let’s dive in.
The page consists of two parts, a form:
<form id="ChallengeForm" action="http://evasi0n.com/" method="POST"> <input type="hidden" name="act" value="jschl"/> <input type="hidden" name="jschl_vc" value="afc458a1300ed9eb1a853d757eadd306"/> <input type="hidden" id="jschl_answer" name="jschl_answer"/> </form>
And a small piece of JavaScript:
$('#challenge').show(); $(function(){setTimeout( function(){ $('#jschl_answer').val(9+50*1); $('#ChallengeForm').submit(); }, 5850 )});
The form has a unique hidden value (jschl_vc) and an empty hidden value (jschl_answer).
The Javascript snippet calculates a mathematical challenge – in our case 9+50*1, which it inserts into jschl_answer and submits the form.
The jschl_vc form field uniquely identifies the challenge to CloudFlare, so that the backend knows what the answer should be. If jschl_answer is interpreted as being the correct result, a cookie called cf_clearance is created with a unique id that identifies the user as having verified the challenge.
In summary
The Cloudflare page checks whether the user has JavaScript enabled.
This looks like a really effective technique against primitive DDOS floods, which issue simple GET requests to a server.
Below are links to the full source of the page: