Skip to content

Instantly share code, notes, and snippets.

Sergey Ermakovich ermakovich

Block or report user

Report or block ermakovich

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View RenderCount React component
import React from 'react';
class RenderCount extends React.Component {
count = 0;
render() {
this.count++;
return this.count;
}
}
@ermakovich
ermakovich / 2fa.feature
Last active Jun 28, 2018
2FA feature example
View 2fa.feature
Feature: 2-factor authentication
Background:
Given I'm logged in
Scenario: Enable 2FA
Given 2FA is disabled
When I navigate to "settings/security"
And I click to enable 2FA
And I enter code for enabling 2FA
Given code for enabling 2FA is correct
@ermakovich
ermakovich / CultureInfoExtensions.cs
Last active Dec 21, 2015
Extension method for the Silverlight System.Globalization.CultureInfo class, that gets the ISO 639-2 three-letter code for the language of the current System.Globalization.CultureInfo object. It uses ISO-639-2 table (http://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt), that is retrieved via Utils.GetResourceStream() custom method. The imp…
View CultureInfoExtensions.cs
using System.IO;
namespace System.Globalization
{
public static class CultureInfoExtensions
{
/// <summary>
/// Gets the ISO 639-2 three-letter code for the language of the current System.Globalization.CultureInfo object.
/// </summary>
/// <param name="cultureInfo"></param>
@ermakovich
ermakovich / StringExtensions.cs
Last active Dec 21, 2015
Extension method for the System.String class, that reports the index of the N-th occurence of a specified string within the current System.String object.
View StringExtensions.cs
namespace System
{
public static class StringExtensions
{
/// <summary>
/// Reports the index of the N-th occurence of a specified string within the current System.String object.
/// </summary>
/// <param name="source">Source string.</param>
/// <param name="value">The string to seek.</param>
/// <param name="n">
You can’t perform that action at this time.