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
@medikoo
medikoo / es6-shims.md
Last active March 24, 2021 22:29
List of ECMAScript 6 shims

List of ECMAScript 6 shims

Implemented on top of ECMAScript 5

Provided as distinct CJS modules, installable via npm


ECMAScript 5 Built-in Objects extensions

Individual modules of es5-ext package. See ES6 features for usage information.

Array

@lelandrichardson
lelandrichardson / ko-convenience.js
Created March 5, 2014 01:11
Knockout.js Custom Utility Bindings
(function (ko, handlers, unwrap, extend) {
"use strict";
extend(handlers, {
href: {
update: function (element, valueAccessor) {
handlers.attr.update(element, function () {
return { href: valueAccessor() };
});
}
},
@wullemsb
wullemsb / GenerateMapping.cs
Created February 9, 2014 19:54
Generate nHibernate XML mapping
var mapper = new ModelMapper();
/*Add your ConFORM mapping code here*/
var compiledMappings = mapper.CompileMappingForEachExplicitlyAddedEntity();
var setting = new XmlWriterSettings { Indent = true };
var serializer = new XmlSerializer(typeof(HbmMapping));
foreach (var hbmMapping in compiledMappings)
{
using (var memStream = new MemoryStream(2048))
using (var xmlWriter = XmlWriter.Create(memStream, setting))
@import url(http://fonts.googleapis.com/css?family=Coda:400,800);
.high {
color:yellow;
}
.lb {
line-height: 65px;
position: absolute;
display: block;
@mlynch
mlynch / ionicNavState.js
Created December 18, 2013 22:50
Ionic Nav State Thingy
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);
}
}
}])
public Func<IDictionary<string, object>, Task<object>> Invoke(Func<IDictionary<string, object>, object> executor)
{
Func<IDictionary<string, object>, Task<object>> invoker = null;
if (executor.Method.ReturnType != typeof (Task<object>))
{
invoker =
p =>
{
var task = new Task<object>(() => executor(p));
@shazron
shazron / app.js
Created May 23, 2013 22:03
RequireJS with Cordova example (app.js)
requirejs(['cordova.js'],
function () {
// start of require
// cordova is now available globally
var exec = cordova.require('cordova/exec');
var app = {
// Application Constructor