Skip to content

Instantly share code, notes, and snippets.

@plugn
plugn / state.js
Created April 18, 2016 13:28 — forked from joladev/state.js
Simple AngularJS State Service for sharing state between controllers.
angular.module('services', [])
.factory('State', function ($rootScope) {
'use strict';
var state;
var broadcast = function (state) {
$rootScope.$broadcast('State.Update', state);
};
var update = function (newState) {
// Throttle from underscore.js, simplified and deattached
var throttle = function(func, wait) {
var context, args, result;
var timeout = null;
var previous = 0;
var later = function() {
previous = Date.now();
timeout = null;
result = func.apply(context, args);
@plugn
plugn / protovis_to_link.js
Created May 10, 2016 22:58 — forked from jweir/protovis_to_link.js
How to save SVG data to a file from a web browser
@plugn
plugn / index.html
Created September 2, 2016 12:53 — forked from anonymous/index.html
Пример отображения геометрии - Sputnik Maps JS API // source http://jsbin.com/labogiq
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Пример отображения геометрии - Sputnik Maps JS API</title>
<link rel="stylesheet" href="http://maps-js.apissputnik.ru/v0.3/sputnik_maps_bundle.min.css"/>
<script src="http://maps-js.apissputnik.ru/v0.3/sputnik_maps_bundle.min.js"></script>
<script src="http://maps-js.apissputnik.ru/v0.3/docs/examples/clusters_data.js"></script>
@plugn
plugn / osx-homebrew-setup.md
Created January 12, 2017 17:23 — forked from sr75/osx-homebrew-setup.md
Mac Yosemite OSX - Homebrew (RVM/MySQL/Redis) setup

Mac Homebrew (RVM/MySQL/Redis) setup

Follow the steps below to setup a local development environment:

XQuartz

Recommended to download latest XQuartz

iTerm2

@plugn
plugn / datepicker.js
Created January 19, 2017 21:13 — forked from icai/datepicker.js
vue 2 directive with jqueryui
Vue.directive('datepicker', {
bind: function (el, binding, vnode, oldVnode) {
$(el).datepicker({
onSelect: function (date) {
vnode.context.date = date;
}
});
},
update: function (el, binding, vnode, oldVnode) {
$(el).datepicker('setDate', binding.value);
@plugn
plugn / index.html
Created January 20, 2017 14:19 — forked from anonymous/index.html
mvt-styler2 // source http://jsbin.com/pimuli
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>mvt-styler2</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.2/css/uikit.min.css"/>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.2/css/components/accordion.min.css"/>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.2/css/components/sortable.min.css"/>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
@plugn
plugn / index.html
Created January 27, 2017 12:40 — forked from anonymous/index.html
sortable multi jsbin
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>SRBL</title>
<script src="http://rubaxa.github.io/Sortable/Sortable.js"></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>SRBL</title>
<script src="http://rubaxa.github.io/Sortable/Sortable.js"></script>
<style id="jsbin-css">
.tile {
margin: 10px 0;
@plugn
plugn / index.html
Created January 31, 2017 10:31 — forked from anonymous/index.html
SRBL // source http://jsbin.com/mibiku
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>SRBL</title>
<script src="http://rubaxa.github.io/Sortable/Sortable.js"></script>
<style id="jsbin-css">
.tile {