Skip to content

Instantly share code, notes, and snippets.

Yury Timofeev y-gagar1n

Block or report user

Report or block y-gagar1n

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 AssertUtils.cs
using NUnit.Framework;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace TestUtils
@y-gagar1n
y-gagar1n / gist:a5dcba9bcc3f889912e2
Created Aug 16, 2014
debugging with node-inspector
View gist:a5dcba9bcc3f889912e2
sudo npm install -g node-inspector
sudo node-debug app.js --debug-brk
@y-gagar1n
y-gagar1n / gist:8469484
Created Jan 17, 2014
DateTime format patterns
View gist:8469484
DateTime.ToString() Patterns
All the patterns:
0 MM/dd/yyyy 08/22/2006
1 dddd, dd MMMM yyyy Tuesday, 22 August 2006
2 dddd, dd MMMM yyyy HH:mm Tuesday, 22 August 2006 06:30
3 dddd, dd MMMM yyyy hh:mm tt Tuesday, 22 August 2006 06:30 AM
4 dddd, dd MMMM yyyy H:mm Tuesday, 22 August 2006 6:30
5 dddd, dd MMMM yyyy h:mm tt Tuesday, 22 August 2006 6:30 AM
@y-gagar1n
y-gagar1n / gist:6742265
Created Sep 28, 2013
VisualStudio.gitignore
View gist:6742265
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
@y-gagar1n
y-gagar1n / gist:6353759
Last active Dec 21, 2015
hg grep - Find revision history of specific line of code
View gist:6353759
hg grep --all "PATTERN" FILENAME
@y-gagar1n
y-gagar1n / gist:5820503
Created Jun 20, 2013
jQuery - AJAX call
View gist:5820503
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: window.location.href + "/SomeMethod",
data: { paramA : valueA, paramB : valueB },
dataType: 'json',
success: function (response) {
...
}
});
@y-gagar1n
y-gagar1n / gist:5788834
Created Jun 15, 2013
Python - Print cyrillic symbols
View gist:5788834
import sys
import pprint
def pretty_print(object):
class decoder_stream:
def write(self, s):
if s.startswith("'") and s.endswith("'"):
s = "'%s'" % s[1:-1].decode('string_escape')
elif s.startswith("u'") and s.endswith("'"):
s = "u'%s'" % s[2:-1].decode('unicode_escape').encode('utf8')
@y-gagar1n
y-gagar1n / gist:5734647
Created Jun 8, 2013
ASP.NET - Call method with jQuery AJAX
View gist:5734647
[WebMethod]
public static void SomeMethod(int paramA, string paramB)
{
...
}
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: window.location.href + "/SomeMethod",
@y-gagar1n
y-gagar1n / gist:5730252
Created Jun 7, 2013
LaTeX - Russian text
View gist:5730252
%Если нужно немного русских слов в английском тексте:
\documentclass[10pt, conference, compsocconf]{IEEEtran}
\fontfamily{cmr}\selectfont
\usepackage[utf8]{inputenc}
\usepackage[russian, english]{babel}
\begin{document}
this is english text
You can’t perform that action at this time.