Skip to content

Instantly share code, notes, and snippets.

View pepyakin's full-sized avatar

Sergei Shulepov pepyakin

View GitHub Profile

Keybase proof

I hereby claim:

  • I am pepyakin on github.
  • I am pepyakin (https://keybase.io/pepyakin) on keybase.
  • I have a public key ASDw4RgKepT0eMpioUUQ5iqjLGVKDfdzWfs7i0p95WgKGAo

To claim this, I am signing this object:

@pepyakin
pepyakin / playground.rs
Last active May 31, 2016 13:23 — forked from anonymous/playground.rs
Shared via Rust Playground
struct Vm {
pc: usize,
}
impl Vm {
fn new() -> Vm {
Vm { pc: 0 }
}
fn execute<F>(&mut self, mut probe: F)
@pepyakin
pepyakin / ExampleApplication.java
Created May 21, 2015 14:48
Gist which should prevent leaks of Activity in ClipboardUIManager.
public class ExampleApplication extends Application {
@Override public void onCreate() {
super.onCreate();
try {
Class<?> cls = Class.forName("android.sec.clipboard.ClipboardUIManager");
Method m = cls.getDeclaredMethod("getInstance", Context.class);
Object o = m.invoke(null, this);
} catch (Exception ignored) { }
}
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.11.+'
// NOTE: Do not place your application dependencies here; they belong
@pepyakin
pepyakin / example.c
Created October 8, 2012 15:05
Basic example msp430-uart for reading 16 bytes and then sending it back at once.
/*
* example.c
*/
#include <msp430g2553.h>
#include <uart.h>
#define ARRAY_SIZE 16
/**