mrkeck Sharing the Love

20Dec/120

Login to Local Computer that is on a Domain

.\username

Logins to local computer instead of the domain

Filed under: windows No Comments
20Dec/120

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 much...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
15Dec/120

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.

Fixed:
In the facebook app settings page go to: Select how your app integrates with Facebook
Put your Application Domain (https://yourappdomain.rpxnow.com/) in the Site Url under Website with Facebook Login.

Wait a few minutes and works fine!

Filed under: janrain No Comments
15Dec/120

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 = 'http://mrkeck.com/processCredentials.php';
Filed under: janrain No Comments
15Dec/120

HTML Comment Convention

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

Basic open/close tags with some css selecting

Filed under: Convention, HTML No Comments
15Dec/120

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
}
15Dec/120

PHP Redirect To Root of Current Folder

<?php
header('location: .');
?>
Filed under: PHP No Comments
15Dec/120

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.

#codeIgniter
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
7Dec/120

Google Drive does Image Recognition

http://www.extremetech.com/computing/132077-google-drive-on-ios-image-recognition

Filed under: interesting No Comments
7Dec/120

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.

1
2
3
4
<!-- 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