Skip to content

Instantly share code, notes, and snippets.

@javlc
javlc / Highcharts Cheat Sheet
Created October 28, 2021 12:47 — forked from mulhoon/Highcharts Cheat Sheet
Highcharts Cheat Sheet
$('#container').highcharts({
chart: {
alignTicks: true, // When using multiple axis, the ticks of two or more opposite axes will automatically be aligned by adding ticks to the axis or axes with the least ticks.
animation: true, // Set the overall animation for all chart updating. Animation can be disabled throughout the chart by setting it to false here.
backgroundColor: '#FFF', // The background color or gradient for the outer chart area.
borderColor: '#4572A7', // The color of the outer chart border.
borderRadius: 5, // The corner radius of the outer chart border. In export, the radius defaults to 0. Defaults to 5.
borderWidth: 0, // The pixel width of the outer chart border.
className: null, // A CSS class name to apply to the charts container div, allowing unique CSS styling for each chart.
defaultSeriesType: 'line', // Alias of type.
@javlc
javlc / HOWTO.md
Created May 31, 2020 15:49 — forked from ivanvermeyen/HOWTO.md
Multiple MySQL versions on MacOS with Homebrew

Multiple MySQL versions on MacOS with Homebrew

At the time of writing (december 2018), there aren’t any up-to-date and easy to apply guides on how to switch between different MySQL version on a Mac using Homebrew . Or at least, I didn’t find any.

So I picked up a few things here and there and finally managed to connect all the pieces of the puzzle. I hope this guide can help you and the future me. If anyone knows of a better way to accomplish this, I do hope they will share their insight :)

The basic idea here is that you need to install all MySQL versions one at a time and assign each its own data directory.

I am using Homebrew 1.8.5. (brew -v)

@javlc
javlc / install_chrome_driver
Created December 22, 2017 02:16 — forked from thotmx/install_chrome_driver
Install chromedriver in Ubuntu (14.04)
$ sudo apt-get install chromium-chromedriver
$ sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/chromedriver
@javlc
javlc / application.controller.js
Last active October 12, 2017 16:34 — forked from ruz/application.controller.js
key press action has no access to event
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
actions: {
keyUp() { console.log( "ku:", arguments) },
keyPress() { console.log( "kp:", arguments) },
keyDown() { console.log( "kd:", arguments) },
mouseEnter() { console.log( "me:", arguments) },
mouseLeave() { console.log( "ml:", arguments) }
@javlc
javlc / components.jquery-picker.js
Last active October 4, 2017 20:54
jquery date range picker
import Ember from 'ember';
export default Ember.Component.extend({
uniqueId: 'my-picker',
didInsertElement() {
$('#two-inputs').dateRangePicker(
{
monthSelect: true,
yearSelect: function(current) {
return [current - 5, current + 5];
@javlc
javlc / components.async-image-wrapper.js
Last active July 26, 2017 14:45 — forked from chrism/components.async-image-wrapper.js
registerWaiter on component directly
import Ember from 'ember';
export default Ember.Component.extend({
imageLoaded: 'image loading',
imageWidth: 'width loading',
// purely to make sure image loads each time and
// is not cached for testing
volatileSrc: Ember.computed('src', function(){
return this.get('src') + '?cache=' + new Date().toISOString();
@javlc
javlc / components.my-component.js
Last active April 19, 2017 14:20 — forked from jhoye/components.input-output.js
Component Interaction
import Ember from 'ember';
export default Ember.Component.extend({
input: '',
output: '',
actions: {
send() {
//console.log('sendHandler: ' + this.get('sendHandler'));
//this.sendAction(this.get('sendHandler'), this.get('input'));
@javlc
javlc / d3-heatmap.html
Created October 10, 2016 19:58 — forked from nfisher/d3-heatmap.html
Simple D3.js SVG heatmap
<!doctype HTML>
<title>D3 Test</title>
<script src="d3.v3.min.js" charset="utf-8"></script>
<style type="text/css">
body {
margin:0 auto;
position:relative;
width:958px;
}
.chart rect {
@javlc
javlc / win10-node-gyp-error.md
Last active January 11, 2016 08:53
node-gyp error on building packages bson and kerberos Win10 x64