Skip to content

Instantly share code, notes, and snippets.

@kongondo
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": [
"<template>",
" <div>$TM_FILENAME_BASE</div>",
"</template>",
"",
"<script>",
"export default {",
View UIkit-sortable-javascript.markdown
@kongondo
kongondo / .block
Created Feb 25, 2018 — forked from mbostock/.block
Multi-Series Line Chart
View .block
license: gpl-3.0
@kongondo
kongondo / .block
Created Feb 22, 2018 — forked from mbostock/.block
Grouped Bar Chart
View .block
license: gpl-3.0
@kongondo
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 @ http://www.toptal.com/d3-js/towards-reusable-d3-js-charts
// Publish a factory method for Chart instances
// @usage:
// var runningChart = BarChart.instanceOf( {barPadding : 2 } );
// var weatherChart = BarChart.instanceOf()
// .fillColor('coral');
window.BarChart = {
@kongondo
kongondo / README.md
Created Feb 18, 2018 — forked from robert-moore/README.md
A New Pattern for Updatable D3.js Charts
View README.md

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.

@kongondo
kongondo / MimeTypes.php
Created Feb 19, 2016 — forked from nimasdj/MimeTypes.php
List of MimeTypes mapped to file extensions
View MimeTypes.php
<?php
// I made this array by joining all the following lists + .php extension which is missing in all of them.
// please contribute to this list to make it as accurate and complete as possible.
// https://gist.github.com/plasticbrain/3887245
// http://pastie.org/5668002
// http://pastebin.com/iuTy6K6d
// total: 1223 extensions as of 16 November 2015
$mime_types = array(
'3dm' => array('x-world/x-3dmf'),
'3dmf' => array('x-world/x-3dmf'),
@kongondo
kongondo / remote-file-copy.php
Created Jan 14, 2016
Remote file copying with progress reporting in PHP.
View remote-file-copy.php
<?php
/*
* Remote File Copy PHP Script 2.0.0
*
* Copyright 2012, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
@kongondo
kongondo / Multisite.module.php
Last active Aug 29, 2015 — forked from LostKobrakai/Multisite.module.php
Multisite routing for ProcessWire
View Multisite.module.php
<?php
// source: https://processwire.com/talk/topic/680-multiple-sites-from-one-install/?p=8778
class Multisite extends WireData implements Module, ConfigurableModule {
public static function getModuleInfo() {
return array(
'title' => 'Multisite',
'version' => 1,
View CustomPageSave.module
<?php
/**
* Adding other types of save buttons for page edit form.
*
* ProcessWire 2.x
* Copyright (C) 2010 by Ryan Cramer
* Licensed under GNU/GPL v2, see LICENSE.TXT
*
* http://www.processwire.com