Skip to content

Instantly share code, notes, and snippets.

View valerysntx's full-sized avatar
🔋
99%

valery sntx valerysntx

🔋
99%
  • Ukraine, Uzhgorod
View GitHub Profile
@valerysntx
valerysntx / xhrpool.js
Created May 3, 2013 04:25
xhrPool - extendable async xml requests pool, with sequent callbacks per xhr
// xhrPool - async xml requests pool, with sequent callbacks per xhr
//
$.xhrPool = [];
$.xhrPool.callbacks = [];
$.xhrPool.starthandlers = [];
$.xhrPool.onEnd = function (name, obj, opts) {
@valerysntx
valerysntx / underscore.uuid.js
Last active December 17, 2015 13:49
client javascript uuid v4 and v5 generator. do not require additional libs. adopted from 'superscore' extensions by David Souther. http://davidsouther.github.com/superscore/ usage: var randomUUID = underscore.UUID.v4(); var uuidv5 = underscore.UUID.v5(msg,namespace);
var underscore = (function(underscore){
// Build several namespaces, globally...
var UUID = {};
var Sha1 = function(str){return Sha1.hash(str, true);};
var Utf8 = {};
var extend = function() {
var options, name, src, copy, copyIsArray, clone,
@valerysntx
valerysntx / stripe.form.html
Last active December 17, 2015 20:28 — forked from anonymous/index.html
styled stripe payment form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Getting Started Form</title>
<!-- The required Stripe lib -->
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<!-- jQuery is used only for this example; it isn't required to use Stripe -->
@valerysntx
valerysntx / uuid.js
Created May 29, 2013 02:00
fast pseudo uuid
var uuid = function() {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);
return v.toString(16);
});
}
@valerysntx
valerysntx / dabblet.css
Last active December 17, 2015 22:19
Untitled
body {
min-height: 100%;
backgroud-src: url('http://29a.ch/slides/2012/webglwater/photos/juska_190113291_291164d962_o.jpg');
background: none;
}
ul{
display:none;
}
@valerysntx
valerysntx / fiddle.css
Created June 4, 2013 13:19
css3 menu effect - see in action - http://jsfiddle.net/EwFHY/15/
/* New navigation */
/* Some stylesheet reset */
#cssmenu > ul {
list-style: none;
/* margin: -95px 0 0 0;*/
padding: 0;
line-height: 1;
float: left;
display:inline;
angular.module('angular-snap', [])
.directive('snap', function() {
var parseBoolean = function(attrValue, defaultValue) {
var strValue = '' + attrValue;
if (strValue === 'true' ||
strValue === 'yes' ||
strValue === '1') return true;
if (strValue === 'false' ||
@import url(http://fonts.googleapis.com/css?family=Coda:400,800);
.high {
color:yellow;
}
.lb {
line-height: 65px;
position: absolute;
display: block;
directive('tab', ['NavStateDelegate', '$scope', function(NavStateDelegate, $scope) {
return {
//
link: function($scope, $element, $attr) {
// Indicate to this delegate we want to control a nav bar
NavStateDelegate.enable(scope);
}
}
}])