Skip to content

Instantly share code, notes, and snippets.

View zzeroo's full-sized avatar
💤
zzeroo...

zzeroo zzeroo

💤
zzeroo...
View GitHub Profile
#include <wiringPi.h>
#define OE 31
#define DS_DATA_IN 33
#define SH_CLOCK 35
#define ST_LATCH 37
void latch_out() {
// Latch out
@zzeroo
zzeroo / shift_in.rs
Created April 18, 2016 10:31 — forked from anonymous/playground.rs
Shared via Rust Playground
#[derive(Debug,PartialEq)]
enum Bitorder {
LSBFIRST,
MSBFIRST,
}
fn main() {
let order: Bitorder = Bitorder::LSBFIRST;
if order == Bitorder::MSBFIRST {
/// Cargo.toml
/// [dependencies]
/// gtk = { git = "https://github.com/gtk-rs/gtk", features = ["v3_10"] }
/// gdk = { git = "https://github.com/gtk-rs/gdk" }
extern crate gdk;
extern crate gtk;
use gdk::enums::*;
use gtk::prelude::*;
@zzeroo
zzeroo / mut_move.rs
Created September 2, 2016 08:57
Mutable after move
extern crate gtk;
use gtk::prelude::*;
#[derive(Clone)]
struct Client {
error_counter: i32,
}
impl Client {
fn new() -> Self {
@zzeroo
zzeroo / thread 'rustc' panicked at 'explicit panic', librbml
Created September 3, 2016 16:21
thread 'rustc' panicked at 'explicit panic', librbml
Pre-trans
Ty interner total ty region both
TyEnum : 104 2.1%, 0.0% 0.0% 0.0%
TyBox : 13 0.3%, 0.0% 0.0% 0.0%
TyArray : 131 2.6%, 0.0% 0.0% 0.0%
TySlice : 12 0.2%, 0.0% 0.0% 0.0%
TyRawPtr : 32 0.6%, 0.0% 0.0% 0.0%
TyRef : 1176 23.3%, 0.0% 0.0% 0.0%
TyFnDef : 2716 53.9%, 0.0% 0.0% 0.0%
TyFnPtr : 86 1.7%, 0.0% 0.0% 0.0%
@zzeroo
zzeroo / Process didn't exit successfully: (exit code: 1)
Created September 4, 2016 08:58
Process didn't exit successfully: (exit code: 1)
DEBUG:cargo::build: executing; cmd=cargo-build; args=["/root/.multirust/toolchains/nightly-armv7-unknown-linux-gnueabihf/bin/cargo", "build", "--verbose"]
DEBUG:cargo::core::workspace: find_root - trying /root/Cargo.toml
DEBUG:cargo::core::workspace: find_root - trying /Cargo.toml
DEBUG:cargo::core::workspace: find_members - only me as a member
DEBUG:cargo::core::registry: load/missing file:///root/buggy
DEBUG:cargo::sources::config: loading: file:///root/buggy
DEBUG:cargo::core::resolver: initial activation: buggy v0.1.0 (file:///root/buggy)
DEBUG:cargo::core::registry: load/missing registry https://github.com/rust-lang/crates.io-index
DEBUG:cargo::sources::config: loading: registry https://github.com/rust-lang/crates.io-index
@zzeroo
zzeroo / gdb output
Last active September 13, 2016 18:34
gdb1
gdb --args rustc /root/.cargo/registry/src/github.com-1ecc6299db9ec823/winapi-build-0.1.1/src/lib.rs --crate-name build --crate-type lib -g -C metadata=00070c9b9a99d27d -C extra-filename=-00070c9b9a99d27d --out-dir /root/buggy/target/debug/deps --emit=dep-info,link -L dependency=/root/buggy/target/debug/deps --cap-lints allow
GNU gdb (Debian 7.11.1-2) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:

libxcommon

cd
git clone http://github.com/xkbcommon/libxkbcommon
cd libxkbcommon
./autogen.sh --prefix=$WLD --enable-docs=no --disable-x11
make && make install

Weston config

[13:15:55.832] weston 1.11.0
http://wayland.freedesktop.org
Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.11.0
Build: 1.11.0 configure.ac: bump to version 1.11.0 for the official release (2016-05-31 17:10:40 -0700)
[13:15:55.833] OS: Linux, 4.6.0-rc6-dirty, #7 SMP Thu Aug 25 11:23:45 CEST 2016, armv7l
[13:15:55.833] Using config file '/root/.config/weston.ini'
[13:15:55.834] Output repaint window is 7 ms maximum.
[13:15:55.834] Loading module '/usr/lib/weston/fbdev-backend.so'
[13:15:55.859] initializing fbdev backend
[13:15:55.860] Creating fbdev output.
@zzeroo
zzeroo / weston.log.md
Last active September 7, 2016 15:50
Startup via systemd unnit
Date: 2016-09-07 CEST
[17:45:21.316] weston 1.11.92
               http://wayland.freedesktop.org
               Bug reports to: https://bugs.freedesktop.org/enter_bug.cgi?product=Wayland&component=weston&version=1.11.92
               Build: 1.11.92 configure.ac: (Re-)bump to version 1.11.92 for the beta release (2016-08-30 12:11:43 -0700)
[17:45:21.317] Command line: /usr/bin/weston --tty=1 --log=/var/log/weston.log
[17:45:21.317] OS: Linux, 4.6.0-rc6-dirty, #7 SMP Thu Aug 25 11:23:45 CEST 2016, armv7l
[17:45:21.318] Using config file '/root/.config/weston.ini'
[17:45:21.319] Output repaint window is 7 ms maximum.