Skip to content

Instantly share code, notes, and snippets.

View pepyakin's full-sized avatar

Sergei Shulepov pepyakin

View GitHub Profile
// 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
/**
@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)

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 / main.rs
Created August 2, 2016 22:03
rustfmt-1116
use foo;
@pepyakin
pepyakin / playground.rs
Created September 14, 2017 12:22 — forked from anonymous/playground.rs
Rust code shared from the playground
#![feature(core_intrinsics)]
use std::os::raw::c_char;
use std::ffi::{CStr, CString};
use std::ptr;
trait ToCStr<T> {
fn borrow_ptr(self) -> (T, *const c_char);
}
@pepyakin
pepyakin / Dockerfile
Last active September 14, 2017 19:03
Dockerfile for building and checking binaryen. Can be useful on macOS. See https://github.com/WebAssembly/binaryen/pull/1184#issuecomment-329430966
FROM ubuntu:trusty
RUN \
apt-get update && \
apt-get install -y build-essential cmake python curl
# Add source for nodejs,
# see https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
RUN apt-get install nodejs
@pepyakin
pepyakin / clang-version.txt
Created September 22, 2017 19:08
Failed rust-bindgen tests
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
@pepyakin
pepyakin / test.log
Created October 9, 2017 17:55
Test failures on current master
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running target/debug/deps/bindgen-0e79f9c99fbeae2f
running 17 tests
test codegen::struct_layout::test_align_to ... ok
test codegen::struct_layout::test_bytes_from_bits_pow2 ... ok
test features::test::str_to_target ... ok
test ir::comment::test::picks_up_single_and_multi_line_doc_comments ... ok
test ir::layout::test_layout_for_size ... ok
test ir::comment::test::processes_single_lines_correctly ... ok
# To build:
# docker build -t rust-bindgen-test .
#
# To run:
# docker run -v "$PWD":/build -w /build -it --rm rust-bindgen-test
#
# On macOS prefer to run with caffeinate.
FROM rust:1.20