Destiny….

Posted on by

Like every year around E3, people go nuts about new games and this year is no different… There’s a few games that have really peaked my interest. I have to admit the latest from Bungie, original creators of “Halo”, the aptly named “Destiny” which is planned to have content for the next ten (10) years… giving you the potential feeling that your character will have a real destiny, was something that I had mixed feelings on. Don’t get me wrong, it looks fantastic, seems like it has an interesting story but the way my gaming habits have changed I wasn’t sure if I wanted to dive into something knowing it’s supposed to be this expansive, so I haven’t pre-ordered it and actually started to kind of ignore some of the videos and news about it. That is, until tonight when I got my Destiny Alpha code… at least now I’ll have a chance to check it out before doing the typical ‘plop down $65 and hope it’s good enough to keep my attention for more than a few days/weeks’. I was originally going to pre-order the game to get the Beta code and just cancel the order before release (if I decided not to get it).

Destiny

I don’t dare install it until tomorrow or Sunday since I know if I do I wont get any of my other work done and I really got to finish cleaning so I don’t have to listen to any more bitching. Funny thing was, if I didn’t get the Alpha invite, I was going to finish Watch Dogs before doing another run of South Park: The Stick of Truth.


Side note, I have a lot of other stuff on my mind that I was going to write about as well, but I’ve procrastinated enough on some of my ‘required’ work.

Category: Misc.

Random Stuff, plus some updates to the custom protocols…

Posted on by

*What I’m watching or Listening to Now*

Not much of anything since one of my 3TB drives died and took just over 2.5TB of video with it.

*Custom Protocols Update…*

First things first… (Using latest version of browser mentioned)
Firefox:
“Sublime Text” Protocol: Completely working
“Speak” Protocol: Does not encode/decode properly… (fine in Chrome) a.k.a. “This is only a test” whether urldecoded or not gets converted to “This%20is%20only%20a%20test” (since %20 equals a ‘space’) therefore NirCmd will actually say “This percent twenty is percent twenty only percent twenty….” etc.

Here’s the fix for ‘Speak’ in Firefox: (Will only work if you have PHP installed on your development system)

@ECHO OFF
TITLE Archigos NirSpeak
MODE CON COLS=50 LINES=3

ECHO.
ECHO                 Ignore this window

FOR /F "tokens=1,2,3* delims=/" %%a in ("%~1") DO (
  SET Protocol=%%a
  SET String=%%b
)
FOR /F "tokens=1* delims=" %%a in ('php -r "ECHO urldecode('%String%');";') DO SET Talk=%%a
nircmd speak text "%Talk%" && EXIT

Chrome:
I’m not sure when (too lazy to look it up), but with one of the updates to Google Chrome they essentially blocked the use of custom protocols (also called “Handlers”) to a certain extent. The new rules are something akin to your web application “must register the custom URI into Chrome and that it MUST be from the same domain”. This is mainly for security in Chrome Apps, but since we’re doing it for testing, I doubt any of you that are willing to write the C++/C# code required for URI Registration would bother with doing something like this… (however, if you’re interested, you can read about that here.)

Thankfully, getting around this limitation is rather easy for what we want to do, but be warned, make sure you fully trust whatever protocols you use with this method because it essentially turns off all of Chrome’s security for them. Both my Sublime Text and Speak Protocols are safe if you follow the directions, but you could essentially write one that could do harmful actions very easily.

Open up the command prompt and enter the correct location from below based on Operating System:
On Windows 7/8/8.1, the path is: %LOCALAPPDATA%\Google\Chrome\User Data
On Windows Vista: %USERPROFILE%\AppData\Local\Google\Chrome\User Data
On Windows XP: %USERPROFILE%\Local Settings\Application Data\Google\Chrome\User Data

Once the window opens, you have to make sure Chrome is CLOSED because it writes data to the “Local State” which you need to edit (preferably in Sublime Text). If you need to open the “Local State” file in a different editor, make sure that the application doesn’t append a file extension (ex. *.txt)

Inside the “Local State” file, which is in the JSON format, you’re looking for the section called “protocol_handler” which should already have a few entries in it and look similar to the following (line numbers are for demonstration here, the section should be kind of close to the bottom):

  "protocol_handler": {
    "excluded_schemes": {
      "afp": true,
      "data": true,
      "disk": true,
      "disks": true,
      "file": true,
      "hcp": true,
      "javascript": true,
     "mailto": false,
     "ms-help": true,
     "ms-windows-store": false,
     "news": false,
     "nntp": true,
     "shell": true,
     "snews": false,
     "vbscript": true,
     "view-source": true,
     "vnd": {
       "ms": {
         "radio": true
       }
     }
   }
 },

Once you find it, you’re going to want to add two lines to this file (I placed them so they stayed alphabetical like the rest)… setting the value to ‘false’ means that the protocol will be used, and ‘true’ means ignore it for security reasons.

  "protocol_handler": {
    "excluded_schemes": {
      "afp": true,
      "data": true,
      "disk": true,
      "disks": true,
      "file": true,
      "hcp": true,
      "javascript": true,
     "mailto": false,
     "ms-help": true,
     "ms-windows-store": false,
     "news": false,
     "nntp": true,
     "shell": true,
     "snews": false,
     "speak": false,
     "subl": false,
     "vbscript": true,
     "view-source": true,
     "vnd": {
       "ms": {
         "radio": true
       }
     }
   }
 },

As you can see on lines 17 and 18, I added both protocols that I created and made sure to match the names used. If you only created one of them, do NOT create an entry for the opposite one. Save the file, open Chrome, test your page with the protocol examples… if you don’t have one, create a new PHP file accessible from ‘localhost’ and paste the following code for a quick and dirty test:

Sublime Test
"; echo "Speak Test"; ?>

*Testing Environment*

A few people have asked once or twice about possibly doing a full write-up of my main test environments (both Web Design and HTPC related) so if people post a response on Facebook if they are interested in either (or both) I’ll possibly create a new page on this site dedicated to it (because it’ll probably be multiple posts and pretty long).


*In regards to last post*
I left this to the end of the post so those looking for the technical stuff above could skip it.
The person I was talking about still wishes to stay anonymous for as long as possible, mainly due to the stigma I had previously mentioned, but stated that since I mentioned it already I could give a little update. Now, it’s not uncommon for people undergoing the initial changes from mental illness to think “No, I’m normal, if you don’t see/hear/etc. it the way I do, you’re the one that’s wrong” and I think the main problem with the first few sets of doctors were that they did NOT take this into account and observe the behaviors shown and it didn’t help, that he apparently withheld a lot of information for this same reason. I think it was around the third set of doctors we found that started to notice not everything was being said, or that some things being said weren’t necessarily the truth (not that he was intentionally lying, it was based on his ‘distorted’ point of view). This doctor narrowed things down to the point where they debated on if it was some form of extreme bi-polar disorder or (as I suspected) Schizophrenia, the latter ending up being the actual diagnosis.

I think when I was invited to see the doctor with him so the three of us could talk together and I could point out my observations or when details were misinterpreted helped him realize the extent of the paranoia and other symptoms were. The doctor gave him a different type of medication and although most of the symptoms seemed to lessen, you could tell he was still struggling with things. Thankfully, sticking with the current doctor, changing medications and/or dosages a few times, and other forms of support, he seems to have gotten most things under control and for the most part, none of what is going on is noticeable to those that weren’t told at least something prior.

Category: Misc. | Tags:

A lot… of random… well, life happens!

Posted on by

*What I’m Watching or Listening to Now*
Who cares?

*Random Question* OR *Random Quote*
No really, who cares? Actually, the real question is the age-old… “Why do bad things happen to good people?” Don’t get me wrong, the ‘good’ person in question is far from a Saint, but they never really did anything to anyone, in fact, for the most part, they just kept to themselves.

I know a common theme in a chunk of my posts is about wanting to write more often, but this is one of the rare cases where I didn’t ‘forget’ or ‘just didn’t get around to it’ and had a real reason to not write. The person mentioned above hasn’t given me permission to write about them so I’m not going to post many details and try my best not to identify them in any way (other than he’s obviously male). Mental illness is something that a lot of people in today’s society look down upon and sadly way to many people view people with pretty much any form of mental illness as inferior. There’s varying forms of illness and in almost every case the person suffering is in no way at fault for what they must endure. Yes, I’m rambling, and I don’t give a shit… there’s so much going through my head, especially what they are going through, how quickly it seems to be progressing, and the fact that there’s nothing I can do to help them.

I’ve dealt with my share of doctors the last few years since my issues started, some were wonderful, some were complete fucking idiots, but in my case, after the initial scans, the doctors all agreed, “it’s cancer” and after going to a specialist and another set of scans, they figured out what kind… Now the treatment for it was another story altogether, but my point here isn’t trying to lessen the seriousness of Cancer and I know there’s many patients that have it a lot worse than I did, but to say that’s there’s a big difference with doing a body scan, finding a tumor and saying, “here’s where we have to concentrate on” as opposed to admitting that as humans and all the advancements we’ve made, there’s still a shit load about the human brain that we just don’t understand. Case in point, the many doctors that he’s gone to see have all been utterly useless to this point, either saying things that a kid that barely passed high school biology would be like “Um, no, that’s not right.” or essentially just says “Here, take these pills and it’ll fix it” when those pills aren’t even related to anything remotely close. It’s like giving thyroid medication to a guy that accidentally cut off his finger and saying “This should make it grow back.”.

Even my extremely limited knowledge of mental illness, the different kinds, etc. lead me to believe that all the things I’ve witnessed him demonstrate over the (roughly) last two months point towards Schizophrenia and as I said above, certain aspects seem to be progressing. It’s difficult to talk openly about things like this considering the perceived stigmata attached and I’ve been meaning to do research (not just on the disease, but on forms of help, like hotlines, etc.). In fact, after I finish this post, I’m going to start said research and make a few phone calls.


There’s so much on my mind, about this, about my medical issues (which have been causing some more difficulties lately as well), projects I’m working on, etc. The list could go on for pages but I’m sure that’ll just drive away the few readers I have left. But on a two-part closing note, I wanted to thank a good friend of mine that I know reads this blog and I’ve talked with about all of the above stuff and even though he doesn’t even live in the same state anymore, he’s been there and is the only person I trust to talk with about this stuff (at this stage anyway). If and when things become a little more public I may revisit this topic in more detail, describing some of the things I’ve witnessed first hand, outlets for people to find help or anything else that I’ve learned and think may help others in similar situations. The second point is most of the readers that view this (if they’ve stayed around this long) probably came from a link via my Facebook page and if you know of any good resources (other than Wikipedia) about Schizophrenia including hot-lines or whatever (please no links to buy a book on Amazon or things of that nature) please comment on the Facebook post with the information. Lastly, please refrain from negative comments, guesses at the person’s identity, or general assholeishness as this is a sincere request for help and/or information.

Category: Misc.

Quickie Custom ‘Speak’ Protocol

Posted on by

I mentioned on Facebook I was thinking about adding the second protocol I did and also about changing this to a more tech related blog… Well, here’s the “Speak” protocol and I’m still debating on if/when I may do the blog changes.

If you came directly to this post, read the previous one to get an idea about Custom Web Protocols and an idea of what’s going on.

*Required Software*
For starters, this protocol uses some freeware called NirCmd (by NirSoft) which can be downloaded from the bottom of this page. Make sure to download the correct 32bit/64bit version and after you extract it, copy NirCmd.exe to your Windows\System32 directory either manually or by running NirCmd (it offers a button to copy it there automatically).


If you still have the *.reg file from the “Sublime Protocol” you can make a copy of that file and do some simple changes to create this, or if you’re starting from scratch open “Sublime Text” (or your favorite text editor… yes, even Notepad works) and copy/paste the following into your document. Don’t forget to save it with the *.reg extension.

Registry File
Warning:
Modifying the Windows Registry can be hazardous to your computer and cause data corruption, data loss, or just outright kill your system, therefore proceed at your own risk and I will not be held responsible for any damage you may/may not cause. This registry file has been tested and deemed safe on both Windows 7 and Windows 8 but has not been tested on XP or Vista.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\speak]
"URL Protocol"=""
@="URL:SpeakText"

[HKEY_CLASSES_ROOT\speak\DefaultIcon]
@="C:\\Windows\\System32\\shell32.dll,282"

[HKEY_CLASSES_ROOT\speak\shell]

[HKEY_CLASSES_ROOT\speak\shell\open]

[HKEY_CLASSES_ROOT\speak\shell\open\command]
@="C:\\Windows\\System32\\cmd.exe /K nirSpeak.cmd \"%1\""

Notes:

  • If you change the trigger for the protocol (speak) it needs all five references changed.
  • The double \ in the file paths are required.

The last line needs to be altered if you change the name of the Command/Batch file or you get a security error for running the Command Prompt (see previous post for info on this and how to fix it).

Batch File
Taking the name from the registry file, in this case “nirSpeak.cmd”, we create a new empty document with that name and copy the below code into it.

@ECHO OFF
TITLE Archigos NirSpeak
for /F "tokens=1,2* delims=/" %%a in ("%~1") do set protocol=%%a&set str=%%b
nircmd speak text "%str%"
exit

*Using*
There’s one large difference between this and the previous protocol (other than the obvious usage) in which this does NOT encode/decode the information sent which changes a few things with the usage. With the Sublime Protocol for example, if a filename contained a space, that would be converted to %20 and back again where required, but the Speak Protocol would actually say “percent two zero” if you tried to manually encode it. The easiest way to create speech is to create a variable with the entire string you want and than just putting the variable into the URI (which also prevents certain errors due to spaces like speak://multiple words would. It wouldn’t cause a PHP error, but NirCmd would most likely error out or only say the first word).

A great example of how you may want to use this would be to greet your user after they log into your site.

$username = $_POST['username]';
$greeting = "Greetings ".$username;

And then you’d use a JavaScript function or similar to invoke it (in this case: speak://$greeting) on page load or whatever. You could also use buttons or inputs in a similar fashion, like the button I use on one of my sites that reads the stats to the user.

echo "
";

*Final Thoughts*
Obviously both this and the Sublime Protocol could benefit from hiding the Command Window that is spawn but I wanted to write these using as little third party software as I could to make it easier on the reader. Oh and for those that want to play around with the speech function there’s a bunch of information on NirSoft’s website, but for the lazy, open a command prompt and type nircmd speak text "Hello World" and it will say whatever is between the quotation marks.

Development Integration, Custom Web Protocols, and other stuff

Posted on by

*Development Integration*
I’ve been slowly altering my development environments on both my laptop and my main server over the last week so that when I get around to doing the full re-install (which they both need) I can have more of a set game plan on which pieces of software I’ll use, their configurations, etc. mainly because there’s a lot of stray files lingering from apps that I installed and decided they either didn’t fit my style or they just sucked. The point being is that I’ve been using Sublime Text for a long time now and was looking into ways that would integrate it a little more into my flow. On a Mac, you can install a plug in for Sublime (or it might be installed with it by default) where you can open documents directly in Sublime using their custom protocol. Similar to how iTunes will open if you click on a link to an iPhone/iPad app on a webpage.
I did some research to see if it could be done on Windows and let’s just say, my searches didn’t garner promising results. Most of the sites either gave directions of how to activate/use it on a Mac or whatever, with the only reference to Windows is that people claimed it would work or third party apps I have no need for were required. So, I did my usual and got pissed, then decided I would just do it myself, so I’ve managed to get ‘most’ of the same functionality they have on the Mac.

*Custom Web Protocol*
Most people have at least some knowledge of web protocols whether they know it or not. For example, when you type an address into your web browser to visit Google, some users still have a tendency to fully write out http://www.google.com, but even if you don’t, when you click up there, you’ll notice it appended the http:// to it anyway and that’s the part we’re interested in for now. Some other common ones that people have probably heard of would be FTP (ftp://), POP and SMTP for email use, etc.
When I mentioned iTunes above, that’s an example of a custom protocol and is similar to what we’ll be creating for Sublime on Windows (tested on Windows 7 and Windows 8). But some may ask, “What’s the point of all of this?” or “Why would this be useful?” and a great example of this are people that want to implement Custom Error Control into their development so that when something does go wrong, not only do you have some usable information about the problem, but you could just click a link and the source file that contains the error would be opened automatically.


Basic Error in Chrome

Custom Error Control

If you click the second image, you should see near the top middle it says “Open: C:\inetpub\wwwroot\test1\index.php” and that’s the link we’ll be manipulating. Here’s where the platforms are slightly divided, on a Mac, the URI will end up being in the following format: subl://open?url=file://<filename>&line=<number> where ‘<filename>‘ would be the source file with the error and the <number> would take you directly to where the error is located. On the PC side, I haven’t been able to figure out how to utilize the actual line number so I’ve removed it from this, but will make sure to update this post with it if I ever figure it out. Along with the line number, I’ve also removed the starting part of the protocol (open/?url=file://) which leaves you with the following syntax: subl://<filename>. [In both cases, the filename is URLEncoded and has to be decoded for use].

*Now the fun begins*
We have the format of how we’ll set this up, so now we need to create a small Registry file and a single batch file that will handle calling Sublime and passing the required file to it. The actual protocol is subl:// and if you decided to change that, you’ll need to make a few changes to the Registry file (the batch file will stay the same).

Warning:
Modifying the Windows Registry can be hazardous to your computer and cause data corruption, data loss, or just outright kill your system, therefore proceed at your own risk and I will not be held responsible for any damage you may/may not cause. This registry file has been tested and deemed safe on both Windows 7 and Windows 8 but has not been tested on XP or Vista.

Registry File

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\subl]
"URL Protocol"=""
@="URL:SublimeText"

[HKEY_CLASSES_ROOT\subl\DefaultIcon]
@="C:\\Program Files\\Sublime Text 2\\sublime_text.exe"

[HKEY_CLASSES_ROOT\subl\shell]

[HKEY_CLASSES_ROOT\subl\shell\open]

[HKEY_CLASSES_ROOT\subl\shell\open\command]
@="C:\\Windows\\System32\\cmd.exe /K SublimeProtocol.cmd \"%1\""

Notes:

  • If you change the trigger for the protocol (subl) it needs all five references changed.
  • The double \ in the file paths are required.
  • From what I can tell, the icon is not shown anywhere, but still needs to be a valid path.

The command on the last line is going to call a Command/Batch script which we will be doing next, however I wanted to point out, due to security settings on some systems, you may have to make a copy of cmd.exe and call that instead, if that’s the case, just make sure whatever you name the copy is also in your System Path and you change that above as well. The %1 at the end of the command line is what allows us to pass the file through this command, all the \ and ” are just escape characters the Registry needs when writing the “*.reg” file. Copy the above code, and paste it into a new blank document (either in Sublime, or even Notepad) but make sure to save it with the extension “.reg” (for example sublime-protocol.reg) but don’t run it just yet (it wont hurt anything if you do).

Batch File
Taking the name from the registry file, in this case “SublimeProtocol.cmd”, we create a new empty document with that name and copy the below code into it.

@ECHO OFF
TITLE Sublime Protocol Parser
for /F "tokens=1,2,3* delims=/" %%a in ("%~1") do set protocol=%%a&set str=%%b
for /f %%a in ('php -r "echo urldecode('%str%');";') do ( set file=%%a )
START "C:\Program Files\Sublime Text 2\sublime_text.exe" %file%
exit

The protocol sends the entire string (including the protocol itself) to the batch file, so the third line takes that input and strips it down to what we need and the fourth line, with the help of PHP (which I assume you have installed on your development system) takes the URL Encoded Filename and decodes it back into a usable Windows File Path. The entire process would look something like this:
You click a link that looks like this: subl://C%3A%5Cinetpub%5Cwwwroot%5Ctest1%5Cindex.php
The protocol passes that entire string to the batch file, where line three splits it to subl:// and C%3A%5Cinetpub%5Cwwwroot%5Ctest1%5Cindex.php and throws away the first part, now line four takes that and converts it into C:\inetpub\wwwroot\test1\index.php which is now valid to send to Sublime Text (the file replaces %file% dynamically above). Once you have the registry and batch files saved in your Windows Path, double click the registry file in Windows Explorer and it will ask about merging it into the Registry, tell it yes and you should be set.

*Testing*
To test that it works we’ll need to create a simple four line PHP script that creates a subl:// link for us. Open Sublime and create a new file somewhere that is accessible on your server, in my case I’ve been using C:\inetpub\wwwroot\test1\index.php throughout this post. For Microsoft IIS Users, it’d be C:\inetpub\wwwroot\ and for Apache users, the location depends on which package you have installed (Apache, XAMPP, WAMP, etc.) but will normally be inside an htdocs directory.

Sublime Test";
?>

With the above file created, make sure to close the file, than close Sublime. Sadly there’s an issue (at least in Windows 8) where clicking the link will not open the file if Sublime is already running. If I find a fix, I’ll update this post with the information. Open a new tab on your web browser and navigate to where you saved that file (ex. http://localhost/test1/index.php) and you should be presented with a page that looks similar to this:

Clicking that link will spawn a Command Prompt Window with the title “Sublime Protocol Parser” for a brief second, close, and than Sublime should open with the correct file loaded. If it doesn’t, most likely you’re experiencing the security issue I mentioned above. (See the bottom for a more detailed way to correct it.)

*Practical Use*
With my current development environment, I use a modified version of Whoops to handle most of my Error Control and a snippet in Sublime that not only throws the required code into my file as needed, but automatically activates it so I can verify it’s working, at which point I delete a single line than get to coding. The screenshot on the right in the above table gives you a rough idea of how it looks.

Whoops has built-in functionality to allow default code editors and Sublime is already one of them, but if we just set it up to use that, it will give us the links in the wrong format, so this snippet will adjust for that as well. Start by opening Sublime Text and going up to “Tools” => “New Snippet…” and you should be presented with the following code:


  
  
  
  
  

We need to modify the highlighted lines by replacing the code on line 3 with our code and uncommenting lines 6 and 8 to set up the tag trigger and set the scope to PHP:


  
  
  whoops
  
  source.php

Make sure that you leave the <![CDATA[ and ]]> in-tact and you can rename the tab trigger to anything you want, I used ‘whoops’ for the example. Now comes the code to make this snippet worth anything. However, you have to make a small decision (or write two snippets):

  • Are you creating this solely for personal sites or sites that you will run on your system(s) in which you can verify Whoops will be available at all times?
  • Are you creating a site that is meant to be distributed, like an Open Source Web App where you can’t be sure of the environment this will be run on?

If you answered yes to the first question, your snippet can be a lot smaller since you would already know what’s available and what isn’t, however if you answered yes for the second question, you can go about this in two ways:

  • Do the same as you would have answering Yes to question one and remembering to delete or comment out all references before distribution.
  • Write a little extra code so that it only runs on your system and not the end users, leaving it all intact for when you do updates.

The Quickie Version: (From Question 1)

<snippet>
  <content><![CDATA[
  require \$_SERVER['DOCUMENT_ROOT']."/whoops/vendor/autoload.php";
  \$whoops = new Whoops\Run();
  \$errorPg  = new Whoops\Handler\PrettyPageHandler();
  \$errorPg->setEditor(function(\$file) { return "subl://%file"; } );
  \$whoops->pushHandler(\$errorPg);
  \$whoops->pushHandler(\$handler);
  \$whoops->register();

  // Test to verify it works with project, comment out or erase when done
  throw new RuntimeException("Whoops works, you can delete this line now...");

$0
]]></content>
  <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
  <tabTrigger>whoops</tabTrigger>
  <!-- Optional: Set a scope to limit where the snippet will trigger -->
  <scope>source.php</scope>
</snippet>

Extended Version: (From Question 2)

<snippet>
  <content><![CDATA[
  if(\$_SERVER['COMPUTERNAME'] == "YOURSYSTEMNAME") {
    require \$_SERVER['DOCUMENT_ROOT']."/whoops/vendor/autoload.php";
    \$whoops = new Whoops\Run();
    \$errorPg = new Whoops\Handler\PrettyPageHandler();
    \$handler = new Whoops\Handler\JsonResponseHandler();
    \$handler->onlyForAjaxRequests(true);
    \$errorPg->setEditor(function(\$file) { return "subl://%file"; } );
    \$whoops->pushHandler(\$errorPg);
    \$whoops->pushHandler(\$handler);
    \$whoops->register();
  }
  // Test to verify it works with project, comment out or erase when done
  throw new RuntimeException("Whoops works, you can delete this line now...");

$0
]]></content>
  <!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
  <tabTrigger>whoops</tabTrigger>
  <!-- Optional: Set a scope to limit where the snippet will trigger -->
  <scope>source.php</scope>
</snippet>

In both cases, you have to verify the ‘require’ path is correct and in the second example change “YOURSYSTEMNAME” to the proper name (you can echo it in the test file if unsure what to use).


*Troubleshooting*
Scenario 1: No Command Prompt flash
If you don’t see the command prompt window pop up for a second than most likely the issue is with the registry not being able to forward the info to the batch file. You can open the registry by running “regedit” from the command prompt or run dialog and drill down in the left menu to HKEY_CLASSES_ROOT\subl\ and you should see two folders inside subl (DefaultIcon and shell) and the file paths from the *.reg file will be converted to single “\”. If this is not the case, you can either edit these directly or delete the ‘subl’ key and edit your *.reg file and re-import it.

Scenario 2: Command Prompt opens but doesn’t work
Open your batch file and add “pause” on line above the first for statement. Close Sublime and try your test again, this time, hopefully you should see the command prompt open with the correct title.
One of two things most likely happened, the title showed which suggests you have a typo somewhere else so double check the code you used (again) in each phase… or the title didn’t match which implies there is probably a security issue similar to the one I experienced on one of my systems.
If this is the case, you’ll have to do a little modification to your *.reg file and a single command from the prompt.
Open a command prompt and type:

cd C:\Windows\System32
copy cmd.exe customCMD.exe

Re-open your *.reg and change the last line to @="C:\\Windows\\System32\\customCMD.exe /K SublimeProtocol.cmd \"%1\"" and re-importing that should resolve the problem.

If you need any more explanation or something still doesn’t work you can feel free to comment below, but please note, comments are moderated and wont automatically appear.

Couple Small Updates…

Posted on by

*What I’m Watching or Listening to Now*

Random Marathon O’ Shit… *rolls eyes*

*Random Question* OR *Random Quote*

I’ve been working on a few projects again recently where the developers are from all over the world, so English comes in a variety of ‘good’, ‘bad’, ‘broken’, and ‘what the fuck did he say?’… Anyway, the ‘question of the day’ has nothing to do with working/dealing with foreign speakers or even about how they view Americans. Instead, the question is why does America have such an endless supply of morons that make us all look bad to the rest of the world? Here’s an example… I was at the McDonald’s drive-thru a few days ago and could hear the woman in the vehicle ahead of me order.

Customer: “Do you have a pen?”
Employee: “Do you need a pen ma’am?”
C: “No, it’s for you, I have a really big order and you better not screw it up.”
E: “Don’t worry about that ma’am, the register takes care of all that when I enter it in.”
C: “Fine, I have a coupon for the Whopper… it’s a buy one get one free, but before you ring that up …”
E: {interrupts} “We don’t serve the Whopper, did you mean a Big Mac?”
C: “I don’t care what you call it, I have a coupon. Now, as I was saying, before you ring up the first one, I want that free one to be my second order
before I have another coupon that’s buy one get one free and so that first one is going to be my free one from the second coupon.”
E: “Ma’am, it doesn’t work that way…”
C: {interrupts} “Don’t tell me how it works, I pay your salary with my taxes you little punk” {Note: the guy sounded like he was in his 30’s}
E: “Ma’am, is there any way you could come into the lobby and we can figure this out?”
C: “I will not come in, I’m in line already because I’m in a hurry.”
E: “Sorry about that ma’am, please pull around to your second window and I’ll have a Manager waiting to speak to you.”

The woman pulled around and I was finally able to order. After pulling around myself I noticed she was still parked in front of the window yelling at the manager because they wouldn’t take her coupons. At one point she just screamed “Give me my g*d damn Whopper” and the employee said “Then go to Burger King where your coupons are for a whopper, we have the Big Mac here… She pulled away from the window towards the road so I moved ahead, got my food, and had to sit there because the stupid bitch still hadn’t pulled out of the parking lot and there wasn’t enough room to leave. 馃檨 All in all, I felt bad for the employee and probably wasted about 20-25 minutes of all of our lives because she wasn’t even at the right place.

P.S. I think I got food poisoning that night as well.

*Actual updates*

As I stated above, I’ve been working on some projects lately (directly and some indirectly) that I’m rather excited about. Below are just a few that I can share, in no specific order:

NextGen Portal

This project has changed so much since originally being introduced somewhere around a year ago. It’s changed hands a bit, it’s been fully rewritten from scratch multiple times… pretty much everything is different, except it’s core purpose. As the first part of the name suggests, this project takes the original “HTPC Portal” to the next generation.

History:

Technically it all started with the ‘basics’ (SickBeard, CouchPotato, Headphones, and a few others) which spawned both MediaFrontPage and Maraschino. XBMC Forum user “hernandito” created a ‘wrapper’ for Maraschino that had a slight resemblance to MFP (don’t remember if that was intentional) in purpose. Not long after its initial creation, I took over the lead of “HTPC Portal”, while continuing to work with hernandito I rewrote his version in PHP and started adding a few things here and there. The project kind of fizzled after a few active months, mostly due to my medical issues, but since most of the site worked properly and there weren’t really any ‘death bugs’ I kind of lost interest. Fast forward to the end of the year and I decided to silently start working on it again (haven’t updated anything on GitHub yet). I’ve written the entire thing from scratch adding a whole pile of new features and should be ready for some beta testers soon.

New Features:

  • Entire Framework Built Specifically with HTPC related features
  • Quick Switching between HTPC Apps (SB, CP, Sab, etc.)
  • Image ‘Checker’ (for now, scans your media sources and allows you to monitor for missing ‘folder.jpg’, ‘fanart.jpg’, ‘logo.png’, etc.)
  • Simple Editing/Updating of certain XBMC Database fields (Hopefully more can/will be added) : No MySQL support, internal database only at this time
  • Other stuff I can’t think of right now…

HTML Generator

I’m not attached to this project.
In under a month since the first public release, the author DeadSix has taken a wonderful app for HTPC enthusiasts to show off their media collection to friends and family and made it even better. A few days after initial release DeadSix and I started talking, I mainly was giving bug reports, some feature suggestions, and beta testing. When he introduced the ability to select a theme to the generated output I wrote two themes that are included with the app and plan on updating these as needed for future versions and possibly adding more of them later.

Some Select Features:

List based on latest version at time of writing (6.2)

  • Auto (or Manual) scan of your XBMC Database (MySQL Support coming soon*)
  • View both poster and fanart (optional) image for each show/movie (if available)
    • Click either of these images to bring up fancybox (per video)
  • MediaInfo (Codec) scanning of media details
  • Ability to sort your TV/Movies (by name, date released, last played, XBMC ID, File Size, Resolution)
  • Auto Generation (start program with ‘/auto’ switch)
  • Ability to show/hide pretty much anything
    • Trailers (plays inline from YouTube)
    • Generated On
    • Last Played
    • File Size
    • Release Date
    • Episode Count
    • Studio
    • Rating
    • Info Link (Displays IMDB/TVDB/AniDB link for media)

*Listed as an upcoming feature on first post of thread
More information available about “HTML Generator” on its XBMC Forum Thread.
htmlgen

So Far Unnamed Project

A new C# project I was contracted for in regards to network management… Once I finish it I’ll talk to them about maybe releasing it (in whole or in parts). I’ve always been more akin to the web development side of programming so this is my first C# application, but as DeadSix seems to say, “All programming is the same, you know one, you know them all” and I have to say that I’ve learned a lot so far with this app and Dead’s right in the sense that I’m picking it up quicker than I had originally thought. Granted there are a few things that take some getting used to but if I realized they were this close I probably would have made the jump years ago and been able to make some ‘real’ money on a more regular basis.

The Rest

I have two other projects I’m working on, the first should be done by this weekend and the other one is just one of those “doing it for myself” kind of things that I’ll get done some time… or more likely never. But I’ve been working on this post on and off for hours (TV is distracting) and it’s after 5am so I’m going to bed and I’ll try to start posting more often again. Well, one last thing, speaking of posting more often, part of the reason I haven’t been posting to often for the last six months or so is I got back into using Facebook (mainly to get certain friends to stop hounding me about it) but now I’m back to the “Fuck Facebook” mentality, so I’ll try writing here instead.

Category: Misc.

HTPC Community

Posted on by

About 12 hours ago or so I made a post on the XBMC Forums in regards to my current status in the HTPC Community. So far there have been no replies after my message so I was unsure if anyone bothered to read it (or care) however after doing some things on my laptop that required a restart, when Windows 8 booted back up I noticed above average hits to my blog from yesterday and although I haven’t actually checked where the hits came from yet, I’m going to assume at least a chunk of them were in regards to that post.

For those of you confused about the above, the jist of it is as follows: I’ve been part of the HTPC Community (mainly for XBMC) for a number of years and have always tried to help out where I can… I was one of the co-creators of the original XBMC BlackMarket (back in the days when XBMC was on the original Microsoft Xbox), I’ve hosted numerous forums/wiki’s dedicated to some of the third party applications/services used in conjunction with XBMC and lately I have (with permission from the developer) created a forum dedicated to “XBMC Constellation” (created by Dawid of FSS.cc) and have provided a majority of their tech support via the XBMC and Constellation Forums. All of this… past and present has been done in my spare time with me eating any costs that has incurred for these activities.

Pretty much everyone (regular blog readers and even members that frequent the XBMC Constellation specific threads) knows that I have had a lot of medical issues for the past few years and because of this, I don’t have a job, therefore I’m on a very limited income with disability… Sadly, the main computer I used for my HTPC, as well as the debug/test system for a lot of the tech support I provide decided to die and I have yet to figure out the cause of it. Partly because of the ‘holiday season’ just getting over and mainly because disability doesn’t pay much of anything, I can’t afford to outright replace the computer (as far as I know, all the hard drives did survive, at least I hope they did) and since I don’t have a system to run XBMC, any of the third party apps/services, or to house any of my media I have decided to temporarily leave the HTPC scene and concentrate on my health. I believe this option is best since I wouldn’t feel right about giving out tech support/advice when I’m forced to guess most of what I’m telling the user to do because I can’t check my system to look up the exact procedure they’d need to fix their issue.

A friend and fellow HTPC enthusiast that I talked with briefly before writing the XBMC Post stated I shouldn’t feel bad about asking the community for help, especially with all I’ve given back when I can and he recommended setting up a donation which I will provide the link at the bottom of this post.

Before I post the donation link I wanted to explain exactly where all the money would be going, how it’s determined, etc. so I don’t have users thinking this is some form of scam or “Hey, I didn’t give you money for that…” type of things.

The first important thing I want to point out… Yes, the donations are going to ME personally, not some group, not some company… after PayPal (the ones processing the donations) take any of their applicable fees, 100% of the remaining donations will be going towards me building a new HTPC/Server. If I get enough donations to cover the cost of building the new system, any money left over will be going solely to help cover my medical costs… I will NOT be ‘blowing the money’ on stupid stuff, I wont waste it on random things… it will be going either in my gas tank for my trips to/from doctors, or go towards paying my medical bills. Once the Server is paid (by myself and/or donations) I will update the post with that information and let people know that if they continue to donate via the link it will be going solely to medical at that point and no longer towards hardware (again so I don’t piss people off or make them think they are donating for the wrong thing).

Anyway, it’s 1:34am here and I have to be awake kind of early in the morning so I’ll make another post sometime over the weekend if I can.

Read above for more information on this donate button before clicking:

I also wanted to thank everyone ahead of time that is willing and able enough to donate, I really don’t want to leave the HTPC Community, I just can’t foresee the ability to do this on my own any time soon.

Category: Misc.

First night… Happy Hanukkah

Posted on by

讛谞专讜转 讛诇诇讜 讗谞讞谞讜 诪讚诇讬拽讬诐 注诇 讛谞住讬诐 讜注诇 讛谞驻诇讗讜转 讜注诇 讛转砖讜讗讜转 讜注诇 讛诪诇讞诪讜转 砖注砖讬转 诇讗讘讜转讬谞讜 讘讬诪讬诐 讛讛诐, 讘讝诪谉 讛讝讛 注诇 讬讚讬 讻讛谞讬讱 讛拽讚讜砖讬诐.
讜讻诇 砖诪讜谞转 讬诪讬 讞谞讜讻讛 讛谞专讜转 讛诇诇讜 拽讜讚砖 讛诐, 讜讗讬谉 诇谞讜 专砖讜转 诇讛砖转诪砖 讘讛诐 讗诇讗 诇讛讗讬专 讗讜转诐 讘诇讘讚 讻讚讬 诇讛讜讚讜转 讜诇讛诇诇 诇砖诪讱 讛讙讚讜诇 注诇 谞住讬讱 讜注诇 谞驻诇讗讜转讬讱 讜注诇 讬砖讜讗讜转讬讱.

The above is a traditional Hanukkah prayer… and below is the Translation for people.

We light these lights for the miracles and the wonders, for the redemption and the battles that you made for our forefathers, in those days at this season, through your holy priests. During all eight days of Hanukkah these lights are sacred, and we are not permitted to make ordinary use of them except for to look at them in order to express thanks and praise to Your great Name for Your miracles, Your wonders and Your salvation.


Sadly, I broke my dreidel… stepped on it while I was cleaning, but I’m sure if I keep looking later tonight or tomorrow I’ll find another one (I think I had three total)
Oh, last thing… saw an ‘old friend’ today and she gave me some Hanukkah Gelt which I thought was cool… Interestingly I didn’t know she was Jewish.

Category: Misc.

Questions, Health, other random crap.

Posted on by

I just wanted to take a second to apologize beforehand about some of the things that are in this post…
  If you don’t want to deal with death, sadness, etc. please skip over the “Random Question” section
  Speaking of the “Random Question” section, sorry if it’s worded ‘weird’… there’s so much running through my head it’s hard to make sense out of some of it.
  I ‘tried’ to keep most of the swearing to a minimum, but some spots… well, oops 馃檪

*What I’m Watching or Listening to Now*
Scary Movie 1 through 4 (I’m currently on number 3)

*Random Question* OR *Random Quote*
For anyone that knows me (or reads enough of this blog) knows that I’ve dealt with a shitload of medical things throughout my life, from the Cancer, Spinal Injuries, depression (most of my life), PTSD (from the military), Insomnia, the list could go on for pages… Anyway, the point being, a few weeks ago I started having really bad vivid nightmares again… the explosions, the deaths, the sound of gun fire… it was like I was re-living certain ‘low points’ in my life again. There’s only been three people my entire life I’ve been comfortable enough with to talk about certain things and even if they didn’t really converse and just listened, the venting helped.

The first was my grandmother who passed away a little over 11 years ago, but I still find myself occasionally taking a step back and thinking about how she’d react to my actions to see if it’s a good idea or not. I could never put into words the impact she had on my life. The second person, which I’m very guarded in talking about (except to a very select few) is the person that gave me the name AJ and changed my life forever. She’s the reason I really joined the military. The last in the list is someone I’ve written about a few times recently (more so on Facebook)… she’s literally saved my life multiple times since we’ve met.

Although the circumstances are most likely different, I assume most of the people reading this can relate to having people in their life (both living and passed) that have been this special. Now, let’s say that someone who fit the above description came to you for a favor but was secretive about it due to the potential life changing results (which don’t really matter for this) and you agree with no questions asked. Then a few days go by without talking so you have no clue what happened… good or bad!

So… since this is under the ‘random question/random quote’ section where’s the question?
Two vital pieces of information missing from the above is that person two passed away in a tragic accident (which is the main reason I don’t talk her to most people) and person three already knows about person two… With that in mind, I know some people thankfully don’t have that experience in their life, but try to envision someone who would ‘fit’ for persons two and three. Now, finally, the question…
Although secretive, say either you figured out “three’s” favor (or they told you) and due to similarities it brings up a lot of memories, and in turn feelings, about how “two” passed away which can obviously screw with someone who has depression issues… Would you tell them about those feelings? Would you attempt to explain that even though you realize they are two totally different people, the similarities brought on fear that you’d lose them too? And finally, how would you explain to a third-party that it was that fear that caused your depression to go into overdrive and that’s the reason behind hurtful comments being directed at them when they did nothing to deserve that treatment?

*Dates*B = Birthday; E = Event; W = Weekend; X = Closed

Holiday/Event Date Notes Marker
Hanukkah Dec. 8 Starts at Sundown (25 Kislev) E
First Day of Winter Dec. 21
Christmas Dec. 25 E
New Year’s Eve Dec. 31 E

*Medical*
A week or two ago, I started getting this pain on the right side of my head. It was more than a ‘ear ache’ or ‘ear infection’ since all the surrounding area hurt to the touch, from my temple down to parts of my neck (where the cancer originally was). I couldn’t even lay my head down without sharp pain travelling my entire body, probably due to the spinal issues, but the spinal issues make my right side normally the most comfortable to lay on. Thankfully pretty much all the pain is gone, as well as the high pitch noise I heard non-stop for three days, but I can tell that the ear canal is still pretty damn swollen and it’s causing hearing issues. I mean I’m nowhere near deaf, but if you’re talking directly to my right ear it almost sounds like your standing at the opposite end of a large concert hall and trying to whisper to me… I can hear it, but it’s a weird ‘hollow’ kind of echo to most of it. When the pain and everything went away I thought to myself “Well, that sucked, but at least it’s gone and I can hear people when they try to talk to me in the car” since I’m always driving and they are on my right. A few hours after that though I started to get this massive fucking migraine and I’ve been sick as hell for the last few days… my stomach doesn’t really hurt per-se, but the vomiting would last hours at a time and the migraines would last even longer.

As mentioned on Facebook, my doctors are kind of pissed at me still because of my weight. Supposedly my ‘ideal weight’ is in the 168-175 lbs (roughly 76-80 kg) range with doctors wanting me near the higher end because of other medical things… I guess having the extra pound or two in that range would show my body is ‘trying’ to remain healthy or something… (No fucking clue). On Tuesday, I go into the little room and said something along the lines of “Same drill?” as I took my coat off and pulled up my arm sleeve waiting for the little blood pressure cuff… then I realized he’s looking at my stomach funny. We had an interesting exchange of words about my weight before I got on the scale and he confirmed I went down to roughly 137 lbs. (62 kg) which is almost a full 8-10 pounds under where I’ve been staying steady at for a while now. Oops… It’s not like I’m starving myself or doing anything on purpose, I’m not anorexic, bulimic, or anything else that induces vomiting on purpose (in fact, that shit sucks so bad, I can’t understand why people would do it on purpose – not judging, just saying ‘fuck that’ as far as it being a so-called ‘option’ for me. To a point, if the doctors told me I’d have to vomit or I’d balloon up to a half ton, I’d ask if I could get a discount on a contractor to widen the door frames).

*Gadgets*
This time of year… I can’t afford anything new/good, but I have my eyes on a few things that I hope to get by next summer and I’ll wait until probably New Year’s or so before I post any specifics since (although unlikely) I may get some of it (or alternates).

*Travel*
Again, like I can afford it. (I have something planned for January though.

*Updates/Upgrades*
I’ve changed the theme for the blog again and I’m still tweaking a few things here and there. I had originally started writing a new theme from scratch but when I tried to activate that one I apparently screwed something up and damn near killed access to the blog, so I found this new theme which I’ll use as the starting point for the new one.

Category: Misc.

Some say “Life is short”….

Posted on by

Sometimes things work in strange ways… Some call it fate, others destiny, maybe “God” or another religious figurehead. This post isn’t about that per-se since I don’t want to cause debates or controversy.

I’ve always had issues while writing about things I try to say not coming across correctly unless I spend way to much time editing, tweaking, etc. A lot of times the most common problem I have is ‘jumping around’. This post will probably be a great example of that since I kind of want my thoughts to flow and really don’t want to spend the time to ‘pretty it up’.

Case in point, a few weeks ago someone I hadn’t talked to in many years sent me a long ass email just trying to ‘catch up’ and I wrote a nice long email back talking about things in my life… a lot of my medical problems, what I went through because of the Cancer and Chemotherapy, loss of family and friends, and a bunch of other random things. The problem was that I had written that email to him after having been awake for about 2+ days straight so I decided I would ‘proof read’ it in the morning before sending it. The problem with that idea is I had already taken a double dose of sleeping pills and accidentally hit the Send button instead. Now, to give him credit, I understand what he did after reading my email would technically fall under “looking out for a friend” but too a point I felt a betrayal because he misunderstood some of what I had written as signs of being suicidal and instead of emailing me back or calling me to just say “Hey, are you ok? Do you need someone to talk to?” he reported me and I was forced to deal with MANY questions about my current mental status (among other things) which really didn’t help me with my depression issues and may have set some of the ‘progress’ I’ve made on my ability to open up to people in my life back a little.

Fast forward to last night: I got a phone call from the above person’s sister. As I stated on Facebook, she was crying hysterically to the point I couldn’t understand anything she was saying (there was a LOT of noise in the background) so her older brother took the phone. He informed me there was a car accident but didn’t really share too many details, we talked for a little bit about his brother’s condition when in mid-sentence I heard some mumbling in the background and he yelled “Amputate his leg… Are you serious?… Wait…” and he hung up the phone. About 3.5 hours later I got another call from the brother telling me that he had passed away from his injuries. I still don’t know the full details of how the accident happened but the first thought I had after the second call is that it may somehow be my fault… (after the doctors figured out I wasn’t suicidal, I was told he got in trouble for ‘wasting their time’ but no clue what kind of ‘trouble’ it was).


I need to stop talking/thinking about this before my depression kicks into over drive. So, on a lighter note: Sometimes I say or do stupid things that may be viewed as suicidal thoughts or actions (as apparent in the above) and I admit that I’ve dealt with depression most of my life but more so after I stared dealing with Cancer. However, even though I have had suicidal thoughts on rare occasions, they are more in the ‘morbid’ category, like for example driving at night while it’s raining and kind of picturing a ‘what-if’ the car hydroplanes off a bridge as opposed to a “fuck life, I’m going to hang/shoot myself”… Either way, I would NEVER act on any of those kind of thoughts and I definitely would not put anyone else at risk, because I do have enough sense/morals to understand that these thoughts are about how my life is screwed up and no one else deserves to ‘go down with me’. Anyway, yes it was similar talk to this that caused my friend above to do what he did, but the reason I’m pointing it out here is that over the last couple months I’ve been talking to someone, building a nice healthy friendship and she’s saved my life (even if she doesn’t believe it when I tell her) so I just wanted to take this time to not only say “Thank you” but to wish her a Happy Birthday and hope that the sadness above doesn’t cloud her beautiful heart and smile.

Category: Misc.