Skip to content

Instantly share code, notes, and snippets.

View santoshshinde2012's full-sized avatar
🏠
Working from home

Santosh Shinde santoshshinde2012

🏠
Working from home
View GitHub Profile
@santoshshinde2012
santoshshinde2012 / MySQL_macOS_Sierra.md
Created March 14, 2018 08:28 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@santoshshinde2012
santoshshinde2012 / MySQL_macOS_Sierra.md
Created March 14, 2018 08:28 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@santoshshinde2012
santoshshinde2012 / onblur.jsx
Created February 23, 2018 17:28
onBlur for entire react component
var HelloMessage = React.createClass({
render: function() {
return <div tabIndex="1" onBlur={this.onBlur}>
Hello <input type="text" value="wat"/>
</div>;
},
onBlur: function(e) {
var currentTarget = e.currentTarget;
@santoshshinde2012
santoshshinde2012 / async-example.js
Created February 12, 2018 06:37
Callback vs Promise and Async/Await
// Callback - Example:
// function to alert user name
var greeting = (name) => { alert('Hello ' + name); };
// function to process user input
var processUserInput = (callback) => { var name = prompt('Please enter your name.'); callback(name); };
@santoshshinde2012
santoshshinde2012 / angularsnippet
Created September 24, 2017 09:00
The difference between services and factories
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
};
});
//factory style, more involved but more sophisticated