Skip to content

Instantly share code, notes, and snippets.

View KANekT's full-sized avatar

Пронин Андрей KANekT

View GitHub Profile
@irustm
irustm / AngularVsReact.md
Last active April 8, 2024 09:47
Angular vs React

На случай важных переговоров

[11.01.18 18:47] [Forwarded from Алексей Охрименко]

  1. Google, Microsoft
  2. Typescript из коробки
  3. Единственный вреймворк с Dependency Injection из коробки
  4. Не нужно ничего React-ить и AngularJS-ифаить. Больше никаких оберток. jQuery плагины и D3 можно использовать на прямую
  5. Более современный фреймворк
@glebmachine
glebmachine / pollyfils.ts
Created December 25, 2018 14:08
Пример полифилов
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/array';
import 'core-js/es6/date';
import 'core-js/es6/function';
import 'core-js/es6/map';
import 'core-js/es6/math';
import 'core-js/es6/number';
import 'core-js/es6/object';
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:converters="clr-namespace:App.Core.Converters"
x:Class="App.Core.Pages.Account.RegisterPage"
Title="{ Binding PageTitle }">
<ContentPage.Resources>
<ResourceDictionary>
<converters:InverseBoolConverter x:Key="notConverter" />
@adamalex
adamalex / ko-datagrid.js
Created June 7, 2013 00:24
Using Knockout to attach a Fuel UX datagrid to an element
// KO binding for attaching a Fuel UX datagrid to an element
ko.bindingHandlers.dataGrid = {
init: function (element, valueAccessor) {
$(element).datagrid({ dataSource: valueAccessor() });
}
};
// Usage:
//
// getGridDataSource should return an instance of a datasource
if (typeof RedactorPlugins === 'undefined') var RedactorPlugins = {};
RedactorPlugins.fontsize = {
init: function(){
var doc = document;
if ( !doc.getElementById( 'redactor-fontsize-style' ) ) {
var head = doc.getElementsByTagName( 'head' )[0];
var imgsrc = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAASCAMAAACZ8IWSAAAAA3NCSVQICAjb4U/gAAAAgVBMVEX///////9VVVX///96enpVVVVVVVVVVVX///9VVVX////Hx8erq6tVVVXo6OhVVVVVVVX////e3t5aWlpVVVX////e3t5VVVX////U1NRVVVV6enpaWlpVVVWrq6uVlZVubm5aWlpVVVVycnJubm5mZmZaWlpVVVWrq6tmZmZVVVU4bmHEAAAAK3RSTlMAEREiIiIzRFVVZmZmZnd3iJmZmZmqqqq7u7vMzMzd3d3d3e7u7u7u////6dkbcAAAAAlwSFlzAAALEgAACxIB0t1+/AAAAB90RVh0U29mdHdhcmUATWFjcm9tZWRpYSBGaXJld29ya3MgOLVo0ngAAACGSURBVBiVrc7JFoIwDAXQIA5YpyKiQalgHSjv/z+QwrKpx41vkUVuk5ToD0Gsac0oLGEFnDFGyOmDe8JgFlP2hlcW27bWlV9HJOWyVQ80ibw/69raoFdSdgXnR6CSct345zWaNISlyf0JjX4fwKHDc0HaAu95QBmzH1Ilcxn53s84577SVAdK6gqHkfp1SQAAAABJRU5ErkJggg==';
@kenstone
kenstone / aspnet45 auth table defintions.sql
Created August 21, 2012 21:08
SQL Table definitions for ASP.NET 4.5 Simple Membership Authentication
CREATE TABLE [dbo].[UserProfile] (
[UserId] INT IDENTITY (1, 1) NOT NULL,
[UserName] NVARCHAR (MAX) NULL,
PRIMARY KEY CLUSTERED ([UserId] ASC)
);
CREATE TABLE [dbo].[webpages_Membership] (
[UserId] INT NOT NULL,
[CreateDate] DATETIME NULL,
[ConfirmationToken] NVARCHAR (128) NULL,
@hodzanassredin
hodzanassredin / vk-oauth.cs
Created March 15, 2012 23:22
vkontakte oauth authorization for asp.net mvc
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using System.Text;
using System.Web;
@realmyst
realmyst / gist:1262561
Created October 4, 2011 19:34
Склонение числительных в javascript
function declOfNum(number, titles) {
cases = [2, 0, 1, 1, 1, 2];
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ];
}
use:
declOfNum(count, ['найдена', 'найдено', 'найдены']);
@cassioeskelsen
cassioeskelsen / RenderViewToString.cs
Created February 17, 2011 11:50
Render a Asp.Net MVC View (Razor) to string
/*
* Original Sample: http://craftycodeblog.com/2010/05/15/asp-net-mvc-render-partial-view-to-string/
*/
public class HomeController : Controller
{
public ActionResult Index()
{
string MyModelData = "";