This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DROP | |
drush -y dis visualization_entity visualization_entity_recline_field_reference | |
drush -y dis uuidreference_select | |
drush -y pm-uninstall visualization_entity_cartodb_bundle | |
drush -y pm-uninstall visualization_entity_choropleth_bundle | |
drush -y pm-uninstall visualization_entity_geojson_bundle | |
drush -y pm-uninstall visualization_entity | |
drush -y pm-uninstall visualization_entity_recline_field_reference | |
drush -y pm-uninstall uuidreference_select |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Production steps of ECMA-262, Edition 6, 22.1.2.1 | |
// Reference: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from | |
if (!Array.from) { | |
Array.from = (function () { | |
var iteratorTypes = [ | |
'[object Map Iterator]', '[object Set Iterator]', | |
'[object WeakMap Iterator]', '[object WeakSet Iterator]' | |
]; | |
var toStr = Object.prototype.toString; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$view = new view(); | |
$view->name = 'panopoly_widgets_general_content'; | |
$view->description = 'Administrative view to show content.'; | |
$view->tag = 'default'; | |
$view->base_table = 'node'; | |
$view->human_name = 'Panopoly General'; | |
$view->core = 7; | |
$view->api_version = '3.0'; | |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You need to apply this once all the animations are already finished. Otherwise labels will be placed wrongly. | |
d3.selectAll('.nv-multibar .nv-group').each(function(group){ | |
var g = d3.select(this); | |
// Remove previous labels if there is any | |
g.selectAll('text').remove(); | |
g.selectAll('.nv-bar').each(function(bar){ | |
var b = d3.select(this); | |
var barWidth = b.attr('width'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
for(let i = 1; i <= 100; i++) { | |
let out = ''; | |
if(i % 3 == 0) { | |
out = 'fizz'; | |
} | |
if(i % 5 == 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var obj = { | |
"name": "Mariano", | |
"age": 32, | |
"language": "spanish", | |
"zip": 1425, | |
"weight": 102, | |
3: 1, | |
0: 3 | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var obj = { | |
0: 3, | |
3: 1, | |
"name": "Mariano", | |
"age": 32, | |
"language": "spanish", | |
"zip": 1425, | |
"weight": 102 | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
"$@" | |
osascript -e "display notification \"Command $1 ends\" with title \"Command status\"" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select(input) { | |
['option1', 'option2'] : 'label'; | |
['otherOption', 'otherOption2'] : 'label2'; | |
}; | |
select('option1') // returns label | |
select('option2') // returns label | |
select('otherOption2') // returns label2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const createSubscriber = (emmiter, store) => handler => { | |
emmiter.addEventListener('message', (message) => handler(message.data)); | |
if (store) store.subscribe(handler); | |
}; | |
export const createDispatcher = (emmiter, store) => action => { | |
emmiter.postMessage(action); | |
if (store) store.dispatch(action); | |
}; |