Skip to content

Instantly share code, notes, and snippets.

View andygrove's full-sized avatar

Andy Grove andygrove

View GitHub Profile
@luben
luben / poc.rs
Last active February 17, 2018 15:35
use std::slice::Iter;
use std::ops::{Add, Mul, Neg};
use std::borrow::Cow;
use std::fmt::Debug;
use std::rc::Rc;
/// Our string type is copy-on-write string refs
type Str<'a> = Cow<'a, str>;
/// Marker trait for the values
@inre
inre / gpio.rs
Created July 31, 2015 20:18
Blink led on raspberry pi 9 (Rust lang)
#![feature(core_intrinsics)]
#[warn(dead_code)]
//#[warn(unused_assignments)]
extern crate mmap;
extern crate libc;
use libc::*;
use std::ffi::CString;
use std::path::Path;
use mmap::{MemoryMap,MapOption};
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule