Skip to content

Instantly share code, notes, and snippets.

@marwinious
marwinious / gulpfile.js
Created December 17, 2019 20:19
Local inline project sample gulpfile.js
const { series, src, dest, watch } = require('gulp');
const babel = require('gulp-babel');
const rename = require('gulp-rename');
const uglify = require('gulp-uglify');
const concat = require('gulp-concat');
const sass = require('gulp-sass');
const cleanCSS = require('gulp-clean-css');
function scripts() {
return src([
@marwinious
marwinious / package.json
Last active December 17, 2019 20:18
Package.json sample for gulp environment
{
"name": "app_name_here",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
@marwinious
marwinious / mod_google_sheets.js
Last active January 28, 2020 18:18
Vue.js: Google Sheets API store pattern module w/underscore
import {_} from 'underscore'
export default {
state: {
},
createGsApiUrl: function(gs_key, sheet_id) {
var gs_url = 'https://spreadsheets.google.com/feeds/list/'+gs_key+'/'+sheet_id+'/public/values?alt=json';
@marwinious
marwinious / mod_http.js
Created December 4, 2019 16:12
Vue.js: HTTP store pattern module w/axios
import Vue from 'vue'
import axios from 'axios'
export default {
state: {
paths: {
dev: 'http://localhost/bitbucket/',
prod: ''
},
endpoints: {
@marwinious
marwinious / BaseDraggableTwoList.vue
Last active October 15, 2019 20:54
Vue.js component for Vue.Draggable (2-list version)
<template>
<!--
Vue.Draggable: https://github.com/SortableJS/Vue.Draggable
-->
<div class="draggable_two_list_container">
<div class="row">
<div class="col-6">
<h5
@marwinious
marwinious / PieChartSvg.vue
Last active January 17, 2023 22:00
SVG Pie Chart Component for Vue.js
/*
Initial concept from: https://seesparkbox.com/foundry/how_to_code_an_SVG_pie_chart
Vue.js component by Darius Babcock
*/
<template>
<div class="pie_chart_svg_container">
<svg
:height="diameter"
:width="diameter"
var imgLoad = $("<img />");
imgLoad.attr("src", ImageGallery.ImagesList[index] + "?" + new Date().getTime());
imgLoad.unbind("load");
imgLoad.bind("load", function () {
// Get image sizes
alert(this.width);
});
@marwinious
marwinious / new_gist_file
Created September 24, 2013 20:41
From http://stackoverflow.com/questions/15407907/jquery-css-important-change-css-on-click How to add "!important" as css using jquery. The "cssText" option is literal and should stay as-is. It's apparently a reserved word that tells jquery what to do.
$("#SomeElement").css("cssText", "height: 650px !important;");