Skip to content

Instantly share code, notes, and snippets.

@tantv
tantv / jquery-dosomething-ES6.js
Last active August 22, 2019 09:01 — forked from mistercoffee66/jquery-dosomething-ES6.js
ES6 module importing jQuery plugin
//jquery-dosomething-ES6.js
//after modification
//assumes jQuery is avail as global or via NPM etc
import jQuery from 'jquery'
export default function() {
// +function($) {
var $this = $(this);
var newText = $this.data('text');
@tantv
tantv / asm-setup.md
Last active October 25, 2018 16:09 — forked from stevekinney/asm-setup.md
MobX
@tantv
tantv / gist:046c017837f32e6c55de9d73c6715ec9
Created June 14, 2018 07:10 — forked from giannisp/gist:ebaca117ac9e44231421f04e7796d5ca
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
@tantv
tantv / pass-arguments-from-cli.md
Created May 18, 2018 06:43
Pass arguments from the command line

Pass arguments from the command line

// npm install --save-dev gulp@next gulp-if gulp-uglify minimist

var gulp = require('gulp');
var gulpif = require('gulp-if');
var uglify = require('gulp-uglify');

var minimist = require('minimist');
@tantv
tantv / git_cheat-sheet.md
Created May 10, 2018 07:27 — forked from davfre/git_cheat-sheet.md
git commandline cheat-sheet
@tantv
tantv / destructuring.js
Created May 8, 2018 16:32 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];
@tantv
tantv / gulpfile.js
Created May 1, 2018 15:34 — forked from botic/gulpfile.js
VueJS 2.x Gulpfile
"use strict";
const del = require("del");
const gulp = require("gulp");
const gulpsync = require("gulp-sync")(gulp);
const gulpif = require("gulp-if");
const rename = require('gulp-rename');
const sourcemaps = require("gulp-sourcemaps");
const source = require("vinyl-source-stream");
const buffer = require("vinyl-buffer");
@tantv
tantv / vuejs-php.md
Created April 4, 2018 02:37
VueJs and PHP