Thursday, June 18, 2015

Command line start MySQL.
sudo /usr/local/mysql/support-files/mysql.server start
To find the MySQL version from the terminal, type at the prompt:
/usr/local/mysql/bin/mysql -v
This also puts you in to a shell interactive dialogue with mySQL, type q to exit.
After installation, in order to use mysql commands without typing the full path to the commands you need to add the mysql directory to your shell path, (optional step) this is done in your “.bash_profile” file in your home directory, if you don’t have that file just create it using vi or nano:
cd ; nano .bash_profile
export PATH="/usr/local/mysql/bin:$PATH"
The first command brings you to your home directory and opens the .bash_profile file or creates a new one if it doesn’t exist, then add in the line above which adds the mysql binary path to commands that you can run. Exit the file with type “control + x” and when prompted save the change by typing “y”. Last thing to do here is to reload the shell for the above to work straight away.
source ~/.bash_profile
mysql -v
You will get the version number again, just type “q” to exit.

Set the MySQL root password

Note that this is not the same as the root or admin password of OSX – this is a unique password for the mysql root user, use one and remember/jot down somewhere what it is.
/usr/local/mysql/bin/mysqladmin -u root password 'yourpasswordhere'
Use the single ‘quotes’ surrounding the password

Fix the 2002 MySQL Socket error

Fix the looming 2002 socket error – which is linking where MySQL places the socket and where OSX thinks it should be, MySQL puts it in /tmp and OSX looks for it in /var/mysql the socket is a type of file that allows mysql client/server communication.
sudo mkdir /var/mysql
sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

AutoStarting MySQL on Reboot

There was a solution recently posted on how to autostart MySQL on reboot on Yosemite, if you follow this it will work:
sudo nano /Library/LaunchDaemons/com.mysql.mysql.plist
And paste in:


  
    KeepAlive
    
    Label
    com.mysql.mysqld
    ProgramArguments
    
      /usr/local/mysql/bin/mysqld_safe
      --user=mysql
            
  
Save it and then:
sudo chown root:wheel /Library/LaunchDaemons/com.mysql.mysql.plist
sudo chmod 644 /Library/LaunchDaemons/com.mysql.mysql.plist
sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist
Then it will load on a restart.

Monday, April 8, 2013

LevelDB

oren.github.com/posts/leveldb.md at master · oren/oren.github.com · GitHub: "LevelDB is a very fast and lightweight embedded database. It was created by two Google engineers and is inpired by BigTable, Google's proprietary file system. You are probably using it without knowing it since it's part of the Chrome browser (exposed as IndexedDB).

Other databases in the embedded category are BerkelyDB and SQLite (it's important to point out the LevelDB is faster). By embedded it means you don't run it in a separate process as you would normally do with many of the popular databases such as MySQL, MongoDB or Redis. LevelDB is contained within your application process and can't be accessed from other process. It is literally just a file based store of key value pairs that does some fancy caching and compression.

If we compare it to Redis, it's even lighter, have more reliable writes and unlike Redis, you don't store your entire data in memory but in the file system. Another difference is Redis have more data structures (sets, lists etc) that LevelDB is lacking. The similarity is that both store key-value pairs and both can save json."

https://github.com/oren/oren.github.com/blob/master/posts/leveldb.md

Sunday, April 7, 2013

Quick Tip: Add Easing to Your Animations » Learning jQuery - Tips, Techniques, Tutorials

Quick Tip: Add Easing to Your Animations » Learning jQuery - Tips, Techniques, Tutorials: "Easing can really bring life to an effect. Easing controls how an animation progresses over time by manipulating its acceleration. jQuery has two built-in easing methods: linear and swing. While they get the job done, they are pretty boring when compared to what's made available through the jQuery easing plugin."

http://www.learningjquery.com/2009/02/quick-tip-add-easing-to-your-animations
http://gsgd.co.uk/sandbox/jquery/easing/

Unfolding 3D Thumbnails Concept

Unfolding 3D Thumbnails Concept: "This demo shows a concept for toggling a thumbnail view for an image slider. The idea is to reveal some thumbs using a 3D effect and indicate the switch in navigation functionility.
This is a concept, the slider functionlity is not implemented."

http://tympanus.net/Development/Unfolding3DThumbnailsConcept/

The exceptionally handsome dashboard framework.

"Dashing is a Sinatra based framework that lets you build beautiful dashboards.

Key features:

  1. Use premade widgets, or fully create your own with scss, html, and coffeescript.
  2. Widgets harness the power of data bindings to keep things DRY and simple. Powered by batman.js.
  3. Use the API to push data to your dashboards, or make use of a simple ruby DSL for fetching data.
  4. Drag & Drop interface for re-arranging your widgets.
  5. Host your dashboards on Heroku in less than 30 seconds.

This project was created at Shopify for displaying custom dashboards on TVs around the office."

http://shopify.github.io/dashing/
http://dashingdemo.herokuapp.com/sample

Intro.js | Better introductions for websites and features with a step-by-step guide for your projects.

Intro.js | Better introductions for websites and features with a step-by-step guide for your projects.: "Better introductions for websites and features with a step-by-step guide for your projects."

http://usablica.github.io/intro.js/

iPhone 5 and iOS 6 for HTML5 developers, a big step forward: web inspector, new APIs and more | Breaking the Mobile Web

iPhone 5 and iOS 6 for HTML5 developers, a big step forward: web inspector, new APIs and more | Breaking the Mobile Web:

QUICK REVIEW

On iPhone 5:

  1. New screen size
  2. New simulator
  3. What you need to do
  4. Problems

New features on iOS 6:

  1. File uploads and camera access with Media Capture and File API
  2. Web Audio API
  3. Smart App Banners for native app integration
  4. CSS 3 Filters
  5. CSS 3 Cross Fade
  6. CSS Partial Image support
  7. Full screen support
  8. Animation Timing API
  9. Multi-resolution image support
  10. Passbook coupons and passes delivery
  11. Storage APIs and web app changes
  12. Web View changes for native web apps
  13. Debugging with Remote Web Inspector
  14. Faster JavaScript engine and other news

http://www.mobilexweb.com/blog/iphone-5-ios-6-html5-developers