SwiftlyTilting: revisionist reality

Thursday, November 1, 2007

Winter 2.1.1

Just a quick bugfix for Winter.

  • fixed NOTICE of undefined variable
  • fixed count command which would return the incorrect value

And snce it’s been a while since I posted these links:
Winter Homepage on Mediawiki.org
Winter Documentation

Download Winter 2.1.1
Downloaded 319 times

Wednesday, September 19, 2007

How Universal Music Group likes their fake mp3s: Chopped and Screwed

In the battle against filesharers, members of the RIAA sometimes hire companies which attempt to disrupt the sharing of copyrighted material. A common tactic to discourage downloaders is to release multiple bogus copies of the media on P2P networks in an attempt to make it difficult to distinguish a good copy from a bad copy. Recently, MediaDefender — a company which provides this file spoofing service — had a large amount of its internal emails leaked by hackers. The emails are now widely available and as you can imagine make for some interesting reading.

One thing that can be gleaned from the emails is that apparently different companies have different tastes in fake mp3s. Here’s how Universal Music Group prefers to have its media processed for P2P networks:

    They want them to be more jarring mp3s.

    Obnoxious beeps they like. They like stutter drop outs. Volume changes can be added on additionally. They don’t want a hum in the background by itself, but that can be added on. They don’t want the FF-type sounds by themselves.

    They want the gain to drop and go up all the time and then beeps or glitches come in.

    He wants combined effects more than individual things. I’ll talk to y’all more about this tomorrow.

And again:

    Only use chopped and skewed audio decoys for UMG

More:

    Dev Meeting: chopped + screwed decoys

    Randy would like a meeting this afternoon starting between 230 and 300 to discuss our plans are for developing a system that would mass produce and distribute real content filled decoys where the audio/video has been manipulated to the point that it’s annoying to consume media from p2p networks

Of note “Chopped and Screwed” is also a style of hip hop music where the music has been slowed down and occasionally had certain parts of the beat repeated.

Sunday, September 2, 2007

Winter 2.1.0

One thing that has been bugging me about Winter is that code must be left aligned or else MediaWiki will format it with some HTML. This made it impossible to write neat code, especially in longer programs. I finally hit upon a decent workaround and now program code is much more readable.

Before:

{{#function | formatNum ||
{{#if | {{#1}} | {{#1}} | no more }} bottle{{#if | {{#1 == 1}} | | s }}
}}

{{#for | {{#i = 99}} || {{#i >= 0}} || {{#i --}} ||
{{#bottles | @= | {{#formatNum | {{#i}} }} }}
{{#ucfirst | {{#bottles}} }} of beer on the wall, {{#bottles}} of beer.
{{#if | {{#i}} |
Take one down and pass it around, {{#formatNum| {{#i - 1}} }} |
Go to the store and buy some more, 99 bottles
}} of beer on the wall

}}

After

{{#function | formatNum ||
   {{#if | {{#1}} || {{#1}} || no more }} bottle{{#if | {{#1 == 1}} || || s}}
}}

{{#for | {{#i @= 99}} || {{#i >= 0}} || {{#i --}} ||
   {{#bottles | @= | {{#formatNum | {{#i}} }} }}
   {{#ucfirst | {{#bottles}} }} of beer on the wall, {{#bottles}} of beer.
   {{#if | {{#i}} ||
      Take one down and pass it around, {{#formatNum| {{#i - 1}} }}
   ||
      Go to the store and buy some more, 99 bottles
   }} of beer on the wall.

}}

I’ve also added features to access the various template parameter variables used on a page, as well as various other upgrades and bug fixes.

  • changed syntax so that carriage returns are ignored if followed by a space
  • added template variable access
  • added time, microtime, date, urlencode, explode, implode, request_var, template_var, to_str, to_int, show_page_text, version, wordwrap, keep_nl
  • added ^. escape char
  • added <winterprewiki> tag which allows winter to be used before mediawiki processes it
  • added addVar for external user functions to add variables
  • added WinterBeforeProcess and WinterAfterProcess hooks
  • added various information available at runtime such as user name, page name, etc
  • fixed bug with nowinter tag
  • fixed bug when using foreach with noexistent array
  • fixed bugs with & and ? operators (they’re turned into html entities)
  • fixed bug caused by pipes being returned in error messages
  • updated error messages

Download Winter 2.1.0
Downloaded 155 times

Friday, August 24, 2007

All hail Akismet

For some time I’ve had problems with spam commenters. I’ve held them at bay mostly by having an extensive spam word blacklist as well as holding all comments with even one link in the approval queue. My blog had been somewhat dormant for the last year, and I guess the spam bots had been lying in wait or something because soon after I started posting again, my database had been filled to the brim with spam in my approval queue, to the point where my host turned off write access!

I looked at various spam deterrants for blogs and found Akismet. It’s not just a blog plug-in, it’s a whole service which continually monitors comments and posts to many different blogs and other sites which accept user contributions. Using this massive amount of data it can quickly learn how to filter out spam, even as spammers come up with new tactics.

Akismet is free for small blogs, though they do ask if you’re making tons of money to use their pay service. Overall it’s a great service for the average blogger. Unfortunately it’s not without its downsides. You do have to send every comment through their servers and you have to trust that they don’t throw out any good comments. I don’t have enough user discussion to test the false positives, but so far I’ve not had any problems.

I installed Akismet on August 11th, and already it’s stopped over seven thousand spam comments from being made on my blog alone! Here is a live counter of spams stopped since August 11th:

Sunday, August 12, 2007

Winter 2.0.2

A user left a comment notifying me about a warning message which would appear if allow_call_time_pass_reference was set to off in PHP settings. I’ve fixed the problem along with a few other minor bugs for this release. I also added a new comment syntax {{#| You comment here }}

Change log:

* Fixed allow_call_time_pass_reference bug
* Fixed bug with <nowinter> tag
* Fixed bug when undefined variables were referenced
* Added alternative comment syntax

Download Winter 2.0.2
Downloaded 118 times

Friday, August 10, 2007

Winter 2.0.1 and Winter manual updated

I finished up the initial stages of the Winter 2.0 documentation today, so now you should be able to fully take advantage of all the new features. I noticed a few minor issues as I was documenting the code so I corrected them and have released the changes as Winter 2.0.1.

Change log:

  • Fixed some bugs with #eval
  • Changed the | (bitwise or) operator to ? since | is a reserved symbol in Winter (can’t believe I missed that one before!)
  • Improved #comment so that it does not evaluate code
  • Improved the escape character system

Download Winter 2.0.1
Downloaded 83 times

Thursday, August 9, 2007

Imageshack toolbar adds itself to Firefox’s ‘User Agent’ identifier

I was poking around in a log and noticed the Imageshack toolbar had added itself to what my browser’s User Agent. Not really a big deal but still not very polite of the developers.

You can remove it by editing your default.js file in

C:\Documents and Settings\[UserName]\Application Data\Mozilla\Firefox\Profiles

and removing this line:

pref(”general.useragent.extra.ImageShackToolbar”, “ImageShackToolbar/4.2.1″);

Saturday, August 4, 2007

Winter 2.0.0

It’s been over a year since I last released an update for Winter. Since then MediaWiki introduced support for parser function extensions, which provide some of the same basic functionality as Winter. Winter code does not interfere with parser functions, and they can be used on the same page, though care must be taken when combining both types of code together.

This new version of Winter has been in the works for a few months now. Many new features and functions have been added, and some bugs have been corrected as well. The program code has increased in size by nearly 80% since 1.5.0!

Download
Homepage on Mediawiki.org
Documentation

About Winter:

Winter is the Wiki Interpreter, a complete programming language plug-in for MediaWiki, the software which powers Wikipedia and many other wikis across the internet.

Change log:

  • Added installation settings $wgWinterMaxNesting, $wgWinterMaxOperations, $wgWinterMaxIterations, $wgWinterNotAllowed
  • fixed bug in operation count which severely under counted operations
  • fixed bug when trying to loop inside of a function
  • added external function definition support
  • improved tag
  • improved error messages
  • added - and $ to acceptable function and variable name characters, explicitly defined _
  • depreciated #define in favor of #str_replace_all
  • added @ modifier for variable assignment operators
  • added < - and <=> variable assignment operators
  • added & | xor < < >> bitwise operators
  • added ^ arithmetic operator
  • added #add, #subtract, #multiply, #divide arithmetic functions
  • added #strtoupper, #strtolower, #ucfirst, #trim, #ltrim, #rtrim, #strip_tags string functions
  • depreciated #default in favor of #set_param_default
  • added #comment as another name for #null
  • added #debug for easy debugging stub display
  • added #rand function
  • added #html_to_xml and #xml_xpath xml function
  • added array variable type (2 dimensions maximum)
  • added #foreach loop construct for traversing arrays
  • added []= and [][]= operators for array assignment
  • added #count, #array_rand, #array_rand_value, #sort, #rsort, #asort, #arsort, #natsort, #ksort, #krsort array functions

Download Winter 2.0.0
Downloaded 110 times

Monday, August 21, 2006

Will Apple (or anybody!) please make a DJ suite for the iPod?

I recently owned a pair of CD turntables.. I enjoyed using them, though they were bulky and the fact that I had to burn all my music onto CDs was annoying. I ended up selling them because they just weren’t what I wanted.

I really wish I could use my iPod like a turntable. The main feature that needs to be added is variable pitch playback — without this, DJs would not be able to beat match. Other features such as ‘virtual nudging’ and BPM counter would also be useful, though not absolutely necessary.

Tempo changing technology is already being implemented in sports oriented iPods which change tempo depending on heart rate, so there is obviously no technical barrier. The iPod scroll wheel is already the perfect input device to represent a spinning disc, and the large screen could be used to display a wide variety of information and even allow the user to see a visual representation of the waveform, similar to looking at the grooves of a record to find song position.

If well implemented, I can truly see a whole new market for iPods. I mean what DJ wouldn’t want to be able to carry his whole setup in his pocket, and be able to use it for personal listening while not performing? Add a hot little white mixer and every trendy DJ on the planet will be snapping up pairs of ‘pods! :D

Friday, June 30, 2006

I got owned by BraveSentry

I wrote this up a few months ago when my machine was infected with BraveSentry.. since then I’ve been able to get my machine back to normal without having to reinstall windows, but it did require me to reinstall SP2 to get my network settings completely back to normal and restore NAT. I intended to document everything needed to restore my machine but unfortunately I didn’t write everything down, so I present this incomplete post as-is in case it is useful to someone. :)

Last night while I was out of the house, my server machine was infected with BraveSentry and a host of trojans. I returned home and noticed my internet was dow, so I checked the server. It was sending out 100s of spam emails, saturating the connection to the point nothing else could be used.

Since the machine was practically unusable, I rebooted. On loading, by background had gone black and an malware warning appeard in the lower right. A program I had never heard of, let alone installed, BraveSentry, was scanning my computer, telling me I had tons of viruses and I needed to buy the product to get rid of them. Yeah right.

Immediately I open the taskbar to kill BraveSentry and check to see if any other programs are running. The Task Manager has been disabled by your adminstrator. WTF. I go online to try to look up help on how clean my computer, and as soon as I log on my computer becomes a zombie spammer again. Reboot.

I was eventally able to clean out my system by checking all of the various places used to start programs on loading, such as HKCU\System\Software\Microsoft\Windows\CurrentVersion\Run and all similar paths. There was also malware in my system.ini file.

One piece of malware actually seemed to add itself the instant i removed it.. for that one I ended up removing it and then quickly turning off the computer. probably not the best idea in the world but it worked.

Once I deleted all the malware, somehow my internet coonection was also removed. I set up a new connection and went online. My first stop was one of those online virus scan sites. But every time i tried to go one, I was redirected to my local server’s 404 page, meaning the sites had been redirected thru my hosts file. Checking the hosts file, it had been completely replaced with a new file. All anti virus sites were blocked, and certain bank sites were redirected.

Editing the hosts file, I was finally able to run a virus scan, where a number of trojans and other malware were found. I also ran an extensive scan from ewido in safe mode, finding even more problems.

Intellectual Plunger

Ok well, it was actually intellectually plunger but hey, you can’t ask for perfection from spam bots and their random subject line generators all the time ;)

Tuesday, June 27, 2006

My Darpa Protozoa

A few months ago, I started receiving a good deal of spam with randomly generated subject lines. Most of them aren’t really all that interesting and just sound like random words strung together. But sometimes I do get a bit of spam with a funny or interesting title. Today I received a bit of mail with the headline: Slushy Siphon. Sounds like a good band name or something.

I recall the first randomly generated spam title that really stuck in my mind: “My Darpa Protozoa”. Darpa is of course the Defense Advanced Research Projects Agency, and it is within this agency that the Internet, originally called DarpaNet was born. A protozoa is of course a basic form of life. I imagine that the spam was generated via an Internet virus that has commandeered a machine and turned it into a zombie spammer.. in other words, it has been infected with a Darpa Protozoa :D Perhaps the email was a cry for help.

Tuesday, March 7, 2006

phc-win 0.2.1 - bugfixes

As expected, there were some bugs with the first release of phc-win. The biggest problem occured whenever the path of the program file or any code contained a space: it simply wouldn’t compile the code. That has been fixed in this version. Some other minor bug fixes as well.

phc-win 0.2.1 rar archive
Downloaded 2721 times
phc-win 0.2.1 upgrade rar archive
Downloaded 408 times
For the latest version, check the phc-win category.

Monday, March 6, 2006

phc-win: A PHP compiler for Windows

PHC-WIN is a windows application that allows one to create EXEs from PHP code. The PHP code is first converted to PHP bytecode using bcompiler, and then embedded into an EXE using embeder. Compiling the code into bytecode has two benefits: it speeds up load times since the PHP code doesn’t have to be interpreted, and it obfuscates the code so that it cannot be easily reverse engineered.

PHC-WIN itself is written in PHP and utilizes wbObjects, my object oriented layer for WinBinder to create windows controls.

PHC-WIN Wiki page with documentation

Download:
phc-win 0.2.0 rar archive
Downloaded 537 times
phc-win 0.2.0 self extracting exe
Downloaded 625 times
For the latest version, check the phc-win category.
keywords: php to exe, php2exe

Monday, February 13, 2006

wbObjects: Easy Windows Programming in PHP

wbObjects is an object oriented interface for WinBinder, a native Windows API for PHP. WinBinder is a great tool, but unfortunately its current lack of an object oriented interface makes writing applications harder than it needs to be. wbObjects has been created to simply the coding process so WinBinder applications can be developed more rapidly.

wbObjects Home
Documentation
Download: wbObjects 0.7.0
Downloaded 580 times

Sample code:

include_once('../wbObjects.php5');

$window = $wbSystem->createWindow( AppWindow,  'thewindow', 'Hello World!', WBC_CENTER, WBC_CENTER, 300, 100);
$textbox = $window->createControl( EditBox,    'thetext',   '',             5, 10, 280, 22, WBC_LEFT);
$button = $window->createControl(  PushButton, 'thebutton', 'Click Me!',    5, 30, 280, 22);

$button->onMainEvent = 'didClick';
$window->onClose = 'didClose';

$wbSystem->start();

function didClick($params)
{
   $params['wbSystem']->thewindow->messageBox('Hello World!  You typed:'. $params['wbSystem']->thetext->text);
}

function didClose($params)
{  exit;
}

Wednesday, January 18, 2006

Winter 1.5.0

* Added new shortcut syntax: {{#command param1 param2 … paramN}} is the same as {{#command| #param1 | #param2 | … | paramN }}. Each span of whitespace is converted to a pipe character. This is especially useful for math operations: {{#op 1 + 1}} = {{#op| 1 | +| 1}}
* #op can now accept any amount of operations. However, the order of operations is only left to right. ie {{#op 2 - 2 * 3}} will return 0 and not -4.
* Added #formula command
* Added #eval command
* Added #repeat command
* fixed some bugs in #strpos

Download Winter 1.5.0
Downloaded 466 times

Tuesday, January 10, 2006

Read RSS feeds on an iPod

So the other day when I posted the Tao Te Ching for iPod I mentioned that the Notes format wasn’t good for long documents, but RSS feeds seemed like a good idea.

Well here’s a quick and dirty online RSS to Notes conversion utility. Simply enter the URL of the RSS feed in the text box and click Convert! In a few moments you should begin downloading a file. Save this file on your iPod in the Notes directory (or a subfolder) and enjoy later.

RSS URL:

 

Monday, January 2, 2006

Winter 1.4.1

* Added <nowinter> tag to allow Winter code to be displayed without being evaluated.
* Reworked escape character code. Escape characters are now only translated inside of a Winter command instead of anywhere on the page. This ensures that users who are unaware Winter is installed are not confused.
* #define actually works now.
* Switched to x.y.z version numbering system.

Download Winter 1.4.1
Downloaded 170 times

Sunday, January 1, 2006

The Tao Te Ching for your iPod

I bought a new video iPod the other day with some Christmas money. It’s a pretty fun toy. My biggest complaint is that it doesn’t play divx/xvid videos but overall I’m very pleased with my buy. I had looked at other media players but none of them could rival the elegance of the iPod, nor could they offer 30gb of storage space with video support.

While playing with all of the features, I found the iPod supported text files with some simple HTML tags and a few custom meta tags which allows one to create guides, ebooks, or other small documents. At first I had visions of converting Wikipedia over to the iPod, but I unfortunately found that only 1000 files at a maximum 4kb each are supported. This means small bits of information, like perhaps news and weather pulled from RSS feeds.

For now though, it means the Tao Te Ching. More specifically, Ron Hogan’s Tao Te Ching, which is a particularly creative interpretation and I think perhaps one of the most accessible to those who are unfamiliar with Taoism.

To install on your iPod, download the archive, and unzip it in a convenient place. Then copy the The Tao Te Ching folder to the Notes folder on your iPod. (You may need to enable disk mode to access the Notes folder). Then go to Extras > Notes > The Tao Te Ching on your iPod to find the Way.

Download The Tao Te Ching for iPod
Downloaded 1333 times

Tuesday, December 6, 2005

Winter v1.3

More bugfixes and other stuff.. added mod operator

Download Winter 1.3
Downloaded 220 times

Thursday, November 24, 2005

Winter v1.2

Released a new version of winter.. this one allows for a new variable syntax that should save some typing.

Download Winter 1.2
Downloaded 177 times

Thursday, November 17, 2005

Winter bug fixes

As expected, some bugs were discovered in Winter v1.0. I’ve fixed them and released a new version.

Download Winter 1.1
Downloaded 159 times

Wednesday, November 16, 2005

Introducing the Winter scripting language for WikiMedia

Recently I started playing around with MediaWiki, the software that powers Wikipedia and other similar wikis. The software has a useful template system, but as a programmer, I wasn’t satisified with the lack of basic useful features like conditional statements and looping.

I discovered MediaWiki is pretty easy to create extensions for, and so I set out to create useful scripting language that was easy to understand and matched the syntax of other WikiMedia commands. What I ended up with was a full fledged scripting language, with if statements, for and while loops, and even function declarations.

For more information, please see the Winter documentation over on MetaWiki.

Download Winter 1.0
Downloaded 201 times

Sunday, October 30, 2005

phpABC 2.2

This is a security upgrade. All users need to upgrade to this version as soon as possible.

Download phpABC 2.2

Downloaded 5108 times

Wednesday, August 24, 2005

Gain 250 - 300KB of memory on the metropcs vx3200

I was poking around in my phone’s file system the other night and noticed that @metro uses about 250k for the interface files of the application manager… but there are two copies of these files: one copy is for English, the other is for Spanish. If you’re like me, you won’t be using the Spanish language feature, so these files are just wasting space.

As an experiment, I deleted all of the files in /brew/es/. Everything still works and I was able to gain about 250kb of space on my phone for additional apps/ringtones/wallpapers.

I then loaded /brew/en/brewstarting.bmp and /brew/en/brewexiting.bmp into Photoshop and converted them from 32bit (millions of colors) to 8bit (256 colors) and sent the 8bit images back to my phone. The difference was barely noticeable on screen for the 1 second you see the @metro logo, but it saved me an additional 50kb or so.. enough for another mp3 ringtones or a few wall papers depending on color resolution. I then decided to replace the stock images with custom images cause the @metro ones were lame. you may be able to replace them with 1px x 1px images or something to save even more space if you want

This works on my vx3200 but probably will work on any phone with @metro as long as you can access the file system

Validate XHTML | Word Press