Skip to content

Instantly share code, notes, and snippets.

View carloslema's full-sized avatar

Carlos Lema carloslema

View GitHub Profile
@shinshin86
shinshin86 / vuex-plugin-sample.js
Created January 25, 2018 21:29
vuex plugin sample
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const incrementPlugin = store => {
store.subscribe((mutation, state) => {
if(mutation.type === "showCount") {
state.count++
}
@galiak11
galiak11 / Query.swift
Last active September 1, 2016 17:23
Swift CoreData Query API
import Foundation
import CoreData
/**
Query: this is a Swift Query API for CodeData.
Usage example:
// fetch multiple rows
let people = Query("Person").whereEqual( "lastName", lastName ).sort( "name" ).fetch()