Skip to content

Instantly share code, notes, and snippets.

@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active January 31, 2024 14:45
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 :

@xposedbones
xposedbones / map.js
Last active March 23, 2024 19:12
Javascript Map range of number to another range
Number.prototype.map = function (in_min, in_max, out_min, out_max) {
return (this - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}
@gabonator
gabonator / serialws.js
Created November 7, 2015 17:57
Serial port to websocket connector using NodeJs
// http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
"use strict";
process.title = 'node-serial-ws';
// Websocket
var webSocketsServerPort = 1337;
var webSocketServer = require('websocket').server;
var http = require('http');
var server = http.createServer(function(request, response) {
// Not important for us. We're writing WebSocket server, not HTTP server
@weblancaster
weblancaster / instagram-real-time-steps
Created March 10, 2014 18:04
Instagram real time steps
As a heads up make sure you have these things listed below.
1. Make sure that you have everything set up on Instagram with your Key https://github.com/weblancaster/instagram-real-time/blob/master/server.js#L21
2. You have your url's set up https://github.com/weblancaster/instagram-real-time/blob/master/server.js#L29
3. Subscribing your code to Instagram Real Time https://github.com/weblancaster/instagram-real-time/blob/master/server.js#L123
4.To change the hashtag you will need to change "object_id" https://github.com/weblancaster/instagram-real-time/blob/master/server.js#L40
@solenoid
solenoid / gist:1372386
Created November 17, 2011 04:49
javascript ObjectId generator
var mongoObjectId = function () {
var timestamp = (new Date().getTime() / 1000 | 0).toString(16);
return timestamp + 'xxxxxxxxxxxxxxxx'.replace(/[x]/g, function() {
return (Math.random() * 16 | 0).toString(16);
}).toLowerCase();
};
<html>
<head>
<title>Checkbox</title>
<style>
input[type=checkbox] {
display:none;
}
input[type=checkbox] + label
{