Skip to content

Instantly share code, notes, and snippets.

View lukaville's full-sized avatar
🏠
Working from home

Nick Chameyev lukaville

🏠
Working from home
  • Google
  • London, United Kingdom
View GitHub Profile
/* This file has been generated by the Hex-Rays decompiler.
Copyright (c) 2007-2017 Hex-Rays <info@hex-rays.com>
Detected compiler: Visual C++
*/
#include <defs.h>
//-------------------------------------------------------------------------
int __fastcall sub_0(int a1, signed int a2, int a3)
{
signed int v3; // r4
signed int v4; // r3
signed int i; // r6
int v6; // r0
int v7; // r2
int v8; // r1
int v9; // r1
int v10; // r1
int sub_6DC8(int assistantMode, signed int inputSpeedRpm, int assistantConfigAddress) {
signed int targetRpm; // r4
signed int asisstantCoefficient; // r3
signed int i; // r6
int power1; // r0
int power2; // r2
int rpmDiff; // r1
int rawPowerDiff; // r1
int powerDiff; // r1
int resultPower; // r0
@lukaville
lukaville / DismissSystemDialogsRule.kt
Last active July 3, 2019 12:09
Dismiss Android system dialogs (application is not responding and application crashed) before tests to improve tests run stability
import android.content.res.Resources
import android.support.test.InstrumentationRegistry
import android.support.test.uiautomator.UiDevice
import android.support.test.uiautomator.UiSelector
import java.lang.IllegalStateException
/**
* Based on https://github.com/nenick/espresso-macchiato
*/
class DismissSystemDialogsRule : SimpleRule() {
@lukaville
lukaville / patch_and_build.sh
Created June 9, 2020 23:08
Patch transmission for sequential download
#!/usr/bin/env bash
git clone https://github.com/transmission/transmission
cd transmission
python <<END
with open('libtransmission/peer-mgr.c', 'r') as file:
source_code = file.readlines()
function_start = next(i for i, string in enumerate(source_code) if 'comparePieceByWeight' in string)