Find it here: https://github.com/bitemyapp/learnhaskell
# Makefile for a go project | |
# | |
# Author: Jon Eisen | |
# site: joneisen.me | |
# | |
# Targets: | |
# all: Builds the code | |
# build: Builds the code | |
# fmt: Formats the source files | |
# clean: cleans the code |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
{}: # nix-env expects a function | |
let | |
# Get nixpkgs (in configuration.nix, use pkgs for this, but this file is standalone | |
# to test it easier so we have to manually import nixpkgs) | |
pkgs = import <nixpkgs> {}; | |
# First, get the haskell packages from nixpkgs. In configuration.nix, you | |
# can use pkgs.haskellngPackages for this of course. | |
haskellngPackages = pkgs.haskellngPackages; |
This is the process I followed on my Fedora 23 host machine to build a small/minimal vanilla Linux kernel and test in Qemu (based on this blog post). This will provide a safe sandbox in which to test kernel changes, and is generally faster than developing natively on the host machine. Qemu will boot the kernel image directly in the emulated system.
sudo dnf install ncurses-devel kernel-devel kernel-headers gcc gcc-c++ git qemu openssl-devel glibc-static
use std::str; | |
fn main() { | |
// -- FROM: vec of chars -- | |
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}']; | |
// to String | |
let string1: String = src1.iter().collect::<String>(); | |
// to str | |
let str1: &str = &src1.iter().collect::<String>(); | |
// to vec of byte |
Perfetto is super useful for understanding interactions between the kernel and applications. Outside of Android and ChromeOS, though it's use isn't as common. This doc tries to provide a basic walk through to get started using perfetto for upstream kernel development with classic linux distros, potentially running under qemu.
Grab the latest linux- tarball: https://github.com/google/perfetto/releases
Often the tests I’m tracing need to run as root, so because of this, I copied the
binaries in the tarball to /usr/local/bin/
and chmod +x
the binaries to make