mrkeck Sharing the Love


Login to Local Computer that is on a Domain


Logins to local computer instead of the domain

Filed under: windows No Comments

PHP csv Not Recognizing Line End on Mac

//Fix mac line ending issue
ini_set("auto_detect_line_endings", true);
//put each line of the file into an array element
$lines = file('theFile.csv');

If I make the csv in Windows it works without the ini_set, but if I make it on a Mac, not so I am going to set it in the php.ini when I do new setups, but for a quick fix ini_set

Filed under: mac, PHP No Comments

Janrain Facebook API Error

This is the message I got from Facebook following the instructions from Janrain:
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: redirect_uri is not owned by the application.

In the facebook app settings page go to: Select how your app integrates with Facebook
Put your Application Domain ( in the Site Url under Website with Facebook Login.

Wait a few minutes and works fine!

Filed under: janrain No Comments

Janrain tokenUrl

  1. User clicks janrain button
  2. Opens provider login
  3. User logs in
  4. janrain sends credentials back to tokenUrl
//This is the page that janrain will go to when it done with the magic
//janrain.settings.tokenUrl = '__REPLACE_WITH_YOUR_TOKEN_URL__';
janrain.settings.tokenUrl = '';
Filed under: janrain No Comments

HTML Comment Convention

<!-- <Amazing Segment of Code> -->
<div id='amazing'>
     <span class='segment'>
     </span><!-- </.segment> -->
</div><!-- </#amazing> -->
<!-- </Amazing Segment of Code> -->

Basic open/close tags with some css selecting

Filed under: Convention, HTML No Comments

Comment Out a Portion of Code Convention

if(0){  //Change 0 to 1 to turn on code segment
     //Code that I want to turn on and off

PHP Redirect To Root of Current Folder

header('location: .');
Filed under: PHP No Comments

Page not Found CodeIgniter

Check that you have .htaccess in the root and if are using a sub-directory off the root that you have that in .htaccess.

AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
    RewriteEngine On
    # my url is http://localhost/mySubFolder
    RewriteBase /mySubFolder/
    # set your own
    #RewriteBase /
Filed under: codeIgniter No Comments

Google Drive does Image Recognition

Filed under: interesting No Comments

Stop HTML Button from Submitting

By default the HTML button has type='submit' if you set type='button' it will act like a button and not do anything until you give it something to do.

<!-- this will submit the form -->
<button>Clicky 1</button>
<!-- this will do nothing -->
<button type='button'>Clicky 2</button>

It was driving me crazy...all good now

Filed under: HTML No Comments