Skip to content

Instantly share code, notes, and snippets.

View alexsorokoletov's full-sized avatar

Alex Sorokoletov alexsorokoletov

View GitHub Profile
something about reviews
@alexsorokoletov
alexsorokoletov / warnings.txt
Created October 9, 2013 19:08
Sample xap validation issues
1028: The native API vccorlib110d.DLL:?UninitializeData@Details@Platform@@YAXH@Z() isn’t allowed in assembly NativeHttpClient.dll. Update it and then try again.
1028: The native API vccorlib110d.DLL:??0GridLength@Xaml@UI@Windows@@QAA@NW4GridUnitType@123@@Z() isn’t allowed in assembly NativeHttpClient.dll. Update it and then try again.
1028: The native API MSVCR110D.dll:?terminate@@YAXXZ() isn’t allowed in assembly NativeHttpClient.dll. Update it and then try again.
1028: The native API vccorlib110d.DLL:?__abi_WinRTraiseWrongThreadException@@YAXXZ() isn’t allowed in assembly NativeHttpClient.dll. Update it and then try again.
1028: The native API MSVCP110D.dll:?_Syserror_map@std@@YAPBDH@Z() isn’t allowed in assembly NativeHttpClient.dll. Update it and then try again.
1028: The native API MSVCP110D.dll:??1?$basic_streambuf@_WU?$char_traits@_W@std@@@std@@UAA@XZ() isn’t allowed in assembly NativeHttpClient.dll. Update it and then try again.
1028: The native API vccorlib110d.DLL:?InitializeData@Details@Platform@@Y
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.Resources>
<local:ScrollToOpacityConverter x:Key="ScrollToOpacityConverter" />
<local:ScrollToMarginConverter x:Key="ScrollToMarginConverter" />
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
@alexsorokoletov
alexsorokoletov / vmpc.template.xml
Last active December 20, 2016 19:59
MvvmCross ViewModel Property Changed Xamarin Studio Snippet
<?xml version="1.0" encoding="utf-8"?>
<!-- copy to ~/Library/XamarinStudio-5.0/Snippets/ as vmpc.template.xml -->
<CodeTemplates version="3.0">
<CodeTemplate version="2.0">
<Header>
<_Group>C#</_Group>
<Version />
<MimeType>text/x-csharp</MimeType>
<Shortcut>vmpc</Shortcut>
<_Description>property changed</_Description>
@alexsorokoletov
alexsorokoletov / remove-itunesmetadata.sh
Created July 30, 2015 03:00
remove-itunesmetadata.sh
rm -rf ./temporarydir > /dev/null 2>&1
mkdir temporarydir
unzip $1 -d temporarydir
rm -rf ./temporarydir/Payload/*.app/iTunesMetadata.plist
rm -rf "$1.corrected.ipa"
pushd temporarydir
zip -r -X "../$1.corrected.ipa" .
popd
@alexsorokoletov
alexsorokoletov / custom.js
Created November 18, 2015 21:19
External links in menu fix - Ray Theme from ThemeForest http://themeforest.net/item/ray-app-responsive-wordpress-theme/9740730
//fix for external/custom links in menu
//for Ray Theme from ThemeForest http://themeforest.net/item/ray-app-responsive-wordpress-theme/9740730
//put that code to wp-content/themes/ray/assets/js/custom.js
//into nav function (around line 168)
$('.nav a.external').each(function(){this.href = this.href.substring(this.href.indexOf('#http')+1); });
@alexsorokoletov
alexsorokoletov / CIEditorScript.cs
Created November 20, 2015 10:50
Unity3d automation script for Android and iOS
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
public class CIEditorScript
{
static string[] SCENES = FindEnabledEditorScenes ();
@alexsorokoletov
alexsorokoletov / Helpers.sql
Last active February 9, 2022 08:00
Helpful functions when you need to find out what is going on on SQL Server
/* TOP SLOW REQUESTS */
/* time is in microseconds */
SELECT creation_time
,last_execution_time
,total_physical_reads
,total_logical_reads
,total_logical_writes
, execution_count
, total_worker_time
, total_elapsed_time
@alexsorokoletov
alexsorokoletov / DC to Snowshoe ATT signal strength data.csv
Created January 4, 2016 22:02
This gist has CSV-formatted data about AT&T signal strength along the route from DC to Snowshoe, WV
datetime latitude longitude signal_strength
2016-01-03 18:33:12 +0000 38.40894761 -79.99546884 -88
2016-01-03 18:33:22 +0000 38.40841146 -79.99469443 -88
2016-01-03 18:33:32 +0000 38.40748744 -79.99485729 -76
2016-01-03 18:33:42 +0000 38.40637151 -79.99454096 -76
2016-01-03 18:33:52 +0000 38.40494671 -79.99430291 -119
2016-01-03 18:34:02 +0000 38.40346467 -79.99417358 -119
2016-01-03 18:34:12 +0000 38.40239375 -79.99459838 -119
2016-01-03 18:34:22 +0000 38.40129673 -79.99494128 0
2016-01-03 18:34:32 +0000 38.4002956 -79.99613319 0
@alexsorokoletov
alexsorokoletov / uwp_image_resize.cs
Created May 23, 2016 01:49
How to resize image in UWP C# XAML
/// <summary>
/// Resizes and crops source file image so that resized image width/height are not larger than <param name="requestedMinSide"></param>
/// </summary>
/// <param name="sourceFile">Source StorageFile</param>
/// <param name="requestedMinSide">Width/Height of the output image</param>
/// <param name="resizedImageFile">Target StorageFile</param>
/// <returns></returns>
private async Task<IStorageFile> CreateThumbnaiImage(StorageFile sourceFile, int requestedMinSide, StorageFile resizedImageFile)
{
var imageStream = await sourceFile.OpenReadAsync();