Skip to content

Instantly share code, notes, and snippets.

View validate-hex-color.js
* Validates hex value
* @param {String} color hex color value
* @return {Boolean}
function isValidHex(color) {
if(!color || typeof color !== 'string') return false;
// Validate hex values
if(color.substring(0, 1) === '#') color = color.substring(1);
View CKEditor.vue
<!-- Based on -->
<div class="ckeditor">
<textarea :id="id" :value="value"></textarea>
<style scoped>
.ckeditor {
kongondo / currency_list
Created Jan 13, 2020 — forked from champsupertramp/currency_list
World Currency list in PHP Array
View currency_list
array (
'ALL' => 'Albania Lek',
'AFN' => 'Afghanistan Afghani',
'ARS' => 'Argentina Peso',
'AWG' => 'Aruba Guilder',
'AUD' => 'Australia Dollar',
'AZN' => 'Azerbaijan New Manat',
'BSD' => 'Bahamas Dollar',
'BBD' => 'Barbados Dollar',
'BDT' => 'Bangladeshi taka',
kongondo / parsce-csv-test.js
Created Nov 15, 2019 — forked from atomkirk/parsce-csv-test.js
parse csv with javascript
View parsce-csv-test.js
import parseCsv from 'zipbooks/utils/parse-csv'
import { module, test } from 'qunit'
module('Unit | Utility | parse-csv', function(_hooks) {
test('parses csv successfully', function(assert) {
let result = parseCsv('name,age\nadam,31\ntim,32\n"St, clair",26')
assert.equal(JSON.stringify(result), '[["name","age"],["adam","31"],["tim","32"],["St, clair","26"]]')
kongondo / vue.json
Created Sep 26, 2019 — forked from rochabianca/vue.json
Snippet to bring back scaffold on vue on vscode. To use it go to Code>Preferences>User Snippets type vue on the input and paste this code there.
View vue.json
"bring back the scaffold to vue files": {
"prefix": "scaffold",
"body": [
" <div>$TM_FILENAME_BASE</div>",
"export default {",
View UIkit-sortable-javascript.markdown
kongondo / .block
Created Feb 25, 2018 — forked from mbostock/.block
Multi-Series Line Chart
View .block
license: gpl-3.0
kongondo / .block
Created Feb 22, 2018 — forked from mbostock/.block
Grouped Bar Chart
View .block
license: gpl-3.0
kongondo / BarChart.js
Created Feb 21, 2018 — forked from ThomasBurleson/BarChart.js
Reusable Chart component for D3 - using prototypes and factories
View BarChart.js
(function() {
// Based on article @
// Publish a factory method for Chart instances
// @usage:
// var runningChart = BarChart.instanceOf( {barPadding : 2 } );
// var weatherChart = BarChart.instanceOf()
// .fillColor('coral');
window.BarChart = {
kongondo /
Created Feb 18, 2018 — forked from robert-moore/
A New Pattern for Updatable D3.js Charts

Using a new updatable chart format. Update functions are made accessible to the caller, handing over chart controls with full functionality to the caller in a modular manner. Data binding is done with method chaining, like any other configuration variable, and can be changed after initialization. This allows for changes to be rendered in the context of chart history, leveraging D3's transitions and update logic.

You can’t perform that action at this time.