Skip to content

Instantly share code, notes, and snippets.

Avatar
🌊
Working from sea

Sergey Tihon sergey-tihon

🌊
Working from sea
View GitHub Profile
View search.js
FST_PreviewRequests = [];
function FST_RegisterDocPreviewFetch(a) {
ULShpi: ;
FST_PreviewRequests.push(a)
}
var gTotReq = 0,
gTotReqSent = 0;
function FST_StartDocPreviewFetch(b, c) {
View init.js
function navigateMailToLink(a) {
ULSA13: ;
window.location = "mailto:?body=" + escapeProperly(a)
}
View init.js
function GetUrlKeyValue(d, e, a) {
ULSA13: ;
var c = "";
if (a == null) a = window.location.href + "";
var b;
b = a.indexOf("#");
if (b >= 0) a = a.substr(0, b);
b = a.indexOf("&" + d + "=");
if (b == -1) b = a.indexOf("?" + d + "=");
if (b != -1) {
View masterpage.master
before:
<body onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();">
after:
<script type="text/javascript">
var attempts_remain = 200;
function _lazySpBodyOnLoadWrapper() {
if (typeof(_spBodyOnLoadWrapper) == 'undefined' || !(document.readyState === "complete")) {
if (attempts_remain > 0) {
attempts_remain--;
@sergey-tihon
sergey-tihon / gist:2838208
Created May 30, 2012
How to update SPListItem Created/Modified date
View gist:2838208
using System;
using Microsoft.SharePoint;
namespace EPAM.USPS.SharePoint.Core.Utilities.Specific
{
public class ListItemPropertySet
{
public ListItemPropertySet()
{
}
View main.cpp
/**************************************************************************************************
* SuperSDG v2.2 release *
* Copyright (c) 2002-2008 Ravent *
* All rights reserved *
* Нарушение авторских прав карается жесотким и мучительным угрызением совести. *
**************************************************************************************************/
#pragma comment (lib,"glut32.lib")
#pragma comment (lib,"glaux.lib")
#include <gl/glaux.h>
View gist:2888161
open System.IO;
let rec getAllDirectories dir =
Directory.GetDirectories(dir)
|> Array.collect getAllDirectories
|> Array.append [|dir|]
let directoryName = System.Environment.GetCommandLineArgs().[1]
@sergey-tihon
sergey-tihon / SourceDocumentBuilder.cs
Created Sep 28, 2012
ISource for DocumentBuilder
View SourceDocumentBuilder.cs
/***************************************************************************
Copyright (c) Microsoft Corporation 2011.
This code is licensed using the Microsoft Public License (Ms-PL). The text of the license can be found here:
http://www.microsoft.com/resources/sharedsource/licensingbasics/publiclicense.mspx
***************************************************************************/
@sergey-tihon
sergey-tihon / TableCellSource.cs
Created Sep 28, 2012
Table Cell Source for Document Builder
View TableCellSource.cs
public class TableCellSource : ISource
{
public WmlDocument WmlDocument { get; set; }
public bool KeepSections { get; set; }
public string InsertId { get; set; }
public int TableNum { get; set; }
@sergey-tihon
sergey-tihon / gist:3894956
Created Oct 15, 2012
ADO.NET Table Columns Names
View gist:3894956
namespace ADOConsoleApplication
{
using System;
using System.Data;
using System.Data.SqlClient;
class Program
{
static void Main(string[] args)
{