Skip to content

Instantly share code, notes, and snippets.

@digitalhitler
digitalhitler / smali-cheatsheet.txt
Created September 4, 2018 21:20
Smali docs на русском
Небольшая помощь в Smali
(Будет дополняться)
#
Общая информация
#
Smali
Виды(Types)
Байт-код Dalvik имеет два основных класса типов, примитивные типы и ссылочные типы. Типы ссылок - это объекты и массивы, все остальное является примитивным.
@SlyZ
SlyZ / CommandToCommandBindings.cs
Last active January 4, 2019 13:02
MVVM-friendly RoutedCommands. Command to command binding can be used to redirect one command to another. The primary use case for it is a redirection of a RoutedCommand to a different ICommand implementation (e.g. DelegateCommand, RelayCommand, etc.). Unlike the standard WPF CommandBinding, CommandToCommandBinding is a DependencyObject with Depe…
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Input;
namespace Sly.Toolkit
@jagt
jagt / twod_array.linq
Last active January 4, 2019 13:04
c# 2d array example
void Swap(ref float lhs, ref float rhs)
{
float tmp = lhs;
lhs = rhs;
rhs = tmp;
}
void InplaceFlipX(float[,] arr)
{
@Snegovikufa
Snegovikufa / app.py
Created February 8, 2018 08:16
Extracts dlls from libmonodroid_bundle_app.so
from elftools.elf.elffile import ELFFile
from zipfile import ZipFile
import gzip, string
from io import StringIO, BytesIO
data = open('libmonodroid_bundle_app.so', "rb")
elffile = ELFFile(data)
section = elffile.get_section_by_name('.dynsym')
data.seek(0)
data_read = data.read()
@mwisnicki
mwisnicki / App.xaml.cs
Created July 13, 2012 13:45
[WPF] Handle Loaded event globally
using System;
using System.Windows;
namespace WpfLoadedClassHandler
{
/// <summary>
/// Shows how to globally handle Loaded event.
/// Workarounds bug: https://connect.microsoft.com/VisualStudio/feedback/details/511753/window-loadedevent-doesnt-work-properly-when-used-to-register-a-class-event-handler
/// Discussed: http://stackoverflow.com/questions/11455800/routed-event-class-handler-for-loadedevent-does-not-work-for-most-classes
/// </summary>