Skip to content

Instantly share code, notes, and snippets.

View antoinealb's full-sized avatar

Antoine Albertelli antoinealb

View GitHub Profile
@vlad-ivanov-name
vlad-ivanov-name / build-gcc.md
Last active April 18, 2021 11:58 — forked from lirenlin/build-gcc.md
build cross arm-gcc with newlib

Set environment variables

export TARGET=aarch64-none-elf
export PREFIX=/work/public/$TARGET
export PATH=$PATH:$PREFIX/bin

Build binutils

@dch
dch / free-mbp.md
Last active September 22, 2016 01:24
FreeBSD-11.0-CURRENT with zfs boot on a UEFI-based Apple MacBook Pro early 2011 15" 8 core 2GHz i7

Intro

The goal is to be able to share OSX and FreeBSD while we nut out all the tricky pieces, and use the zpool that FreeBSD boots from, in OSX as our main working storage.

You'll need an MBP with dual drives, in my case, SSDs. This will almost certainly work with a single drive, but the partitioning is a wee bit complicated.

@fenollp
fenollp / string_splitting.c
Last active December 15, 2015 01:59
A use case of strtok_r (instead of strtok) to split a string str wrt ifs characters.
char **ifs_split(const char *str, const char *ifs)
{
size_t index = 0;
size_t size = 1;
char *segment = NULL;
char *start = NULL;
char *rest = NULL;
char **tab = NULL; // Thou shall free thee.
start = dupstr(str);
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active May 14, 2024 18:00
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx