Definitely Un-Proofread

Month

April 2012

19 posts

Announce: PES_CSV_Splitter

This is a very tiny project, that was needed from a single, very specific project, but it seemed worth doing all polished and right, so here is my latest GitHub repository:

PES_CSV_Splitter

Simple PHP Class and command line script for splitting a CSV file into several child files.

Requirements

This class requires PHP 5.3 or later, and the PEAR File_CSV class (see http://pear.php.net/package/File_CSV).

Description

This class allows for simple splitting of a large CSV file into smaller pieces, for easier parsing by memory-limited tools. The header / first line of the CSV file is preserved across all of the generated CSV files.

Generated files are named with the name of the master / source CSV file, an incrementing number, and the a CSV extension. So, if provided a CSV file with 1000 lines in it named “example.csv”, this class would write 10 files, named “example-1.csv” through “example-10.csv”, in the specified directory.

A sample, command line tool for use with the class is also included. This file, “csv_splitter.php”, requires the PEAR Console_Getargs package (see http://pear.php.net/package/Console_Getargs). Information on using this tool is available by running “php csv_splitter.php —help” on the command line.

Author

Peter E. Snyder - snyderp@gmail.com

Apr 30, 2012
#php #opensource
Play
Apr 26, 2012
#The Misfits #Bubblegum-Punk
Play
Apr 26, 20122 notes
#Andrew Potter #The Authenticity Hoax
Psilodump - Drop

Psilodump - Drop

Tasteful chiptune bliss that you could play your parents if you needed to

Apr 23, 20124 notes
#Psilodump #Chiptunes
Never Said One Thing

markjohnson:

Never Said One Thing

The best part, of many great parts, is the vocal twirl at 1:20.  It reminds me of the similar trick in The Blood Brothers – Camouflage, Camouflage at 2:54 (the best part of the whole album)

Apr 21, 20121 note
Home Lately Mark Johnson

markjohnson:

Home Lately

This is from a couple years ago.  After I finished my pop album I realized that I didn’t like how busy it was - there were too many riff-y parts in almost every song.  I made a conscious effort to keep this less busy and I’m really happy with it!

And you can download this by following the link below…

I for one would like to welcome mark back to Tumblr and to encourage him to write more #1 jams like this

Apr 21, 20121 note
How Will I Know (Junior Vasquez Mix) Whitney Houston

annicka:

 Whitney Houston - How Will I Know (Junior Vasquez Mix)

holy god, i’ve never heard this remix and it’s AMAAAAAZING!!!!

IT’S ME:

Its not a joke.  This is great.  Its “slam your drink cause we need to dance NOW” great!

Apr 20, 201216 notes
Play
Apr 20, 2012
Play
Apr 14, 2012
Play
Apr 12, 2012
Play
Apr 11, 201210 notes
#Talking Heads #Born Under Punches
Who said it, JAMES JOYCE or KOOL KEITH? → hudsonhongo.com

cokemachineglow:

“One is the most innovative writer of the 20th century, the other is James Joyce. Can you distinguish between sentences written by the Irish novelist and the lyrics of surrealist rapper Kool Keith?”

Apr 11, 201210 notes
“There is a scene in this film where a character is defecated on by several people at the same time, and I dunno … I didn’t enjoy it.” —Roger Ebert reviewing the Tim and Eric Movie
Apr 9, 20122 notes
#Roger Ebert
Apr 7, 20121 note
#go big or go home
Apr 4, 20122 notes
Play
Apr 1, 20121 note
#The Pleasure Centers
ExpressionEngine bits: Loading A Module from Another Module

I’m currently working on a project that requires building a module for ExpressionEngine.  Its not proving to be my favorite system (to put it mildly), but the upside of the EE folks providing little to no documentation on how the code in the guts of their system works is that I’ve had (gotten to?) figure it out for myself.

One problem I just ran across is how to access functionality from another third_party module, from my third_party module.  Sometimes this is done for you, but other times (such as in an action) the system is only minimally initialized and other modules aren’t in memory / place.

The solution is pretty simple, but its not documented anywhere I could find.  To save other folks the several hours of head banging I went through, here is the simple solution (assuming you want to load up an “example_module” module):

     // 1) Add the path of the module you want to load to the system wide, CodeIgniter path:
     //  $this->EE->load->add_package_path(PATH_THIRD . 'example_module');

     // 2) Manually load up the module's core class (ie don't use the CI_Loader methods):
     // require PATH_THIRD . 'example_module/mod. example_module.php';

     // 3) Add the module to the EE object, since this is where the rest of the system will expect to find it.
     // $this->EE->example_module = new Example_module();

And thats that. So simple you think they would have documented it somewhere :-/

Apr 1, 2012
#ExpressionEngine #PHP
Apr 1, 201270 notes
Apr 1, 20121 note
#The Pleasure Centers
Next page →
2012 2013
  • January 20
  • February 14
  • March 14
  • April 13
  • May 13
  • June 3
  • July
  • August
  • September
  • October
  • November
  • December
2011 2012 2013
  • January 13
  • February 12
  • March 21
  • April 19
  • May 17
  • June 14
  • July 9
  • August 10
  • September 6
  • October 22
  • November 13
  • December 12
2010 2011 2012
  • January 5
  • February 20
  • March 28
  • April 25
  • May 17
  • June 14
  • July 16
  • August 36
  • September 18
  • October 31
  • November 15
  • December 23
2009 2010 2011
  • January 20
  • February 20
  • March 24
  • April 28
  • May 22
  • June 11
  • July 24
  • August 46
  • September 20
  • October 15
  • November 20
  • December 23
2009 2010
  • January 34
  • February 54
  • March 33
  • April 10
  • May 20
  • June 31
  • July 35
  • August 50
  • September 42
  • October 15
  • November 21
  • December 22