Skip to content

Instantly share code, notes, and snippets.

View ilg-ul's full-sized avatar

Liviu Ionescu ilg-ul

View GitHub Profile
@ilg-ul
ilg-ul / install-macports-from-sources.sh
Last active November 5, 2016 10:12
Install MacPorts in /opt/macports from sources.
#!/usr/bin/env bash
if [[ ${DEBUG} != "" ]]; then
set -x
fi
set -o errexit
set -o pipefail
set -o nounset
@ilg-ul
ilg-ul / install-homebrew.sh
Last active November 5, 2016 10:11
Install Homebrew in /opt/homebrew.
#!/usr/bin/env bash
if [[ ${DEBUG} != "" ]]; then
set -x
fi
set -o errexit
set -o pipefail
set -o nounset
@ilg-ul
ilg-ul / build-arm-none-eabi-gdb.sh
Created October 7, 2015 17:53
Build the ARM version of GDB on OS X.
#! /bin/bash
set -euo pipefail
IFS=$'\n\t'
GDB_VERSION="7.10"
GDB_BUILD_FOLDER="~/Work/gdb"
mkdir -p "${GDB_BUILD_FOLDER}"
cd "${GDB_BUILD_FOLDER}"
@ilg-ul
ilg-ul / gnuarmeclipse-c-cpp-formatter-style.xml
Created October 19, 2015 11:52
GNU ARM Eclipse C/C++ formatter style
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="1">
<profile kind="CodeFormatterProfile" name="GNU with spaces" version="1">
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_exception_specification" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/>
<setting id="org.eclipse.cdt.core.formatter.indent_statements_compare_to_body" value="true"/>
<setting id="org.eclipse.cdt.core.formatter.insert_space_after_colon_in_base_clause" value="insert"/>
@ilg-ul
ilg-ul / license-gpl-c-header.txt
Last active August 14, 2024 00:07
C header with GPL license text.
/*
* This file is part of the XXX distribution (https://github.com/xxxx or http://xxx.github.io).
* Copyright (c) 2015 Liviu Ionescu.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
@ilg-ul
ilg-ul / bash-inits.sh
Last active October 21, 2024 09:24
BASH recommended initialisation sequence
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Safety settings (see https://gist.github.com/ilg-ul/383869cbb01f61a51c4d).
if [[ ! -z ${DEBUG} ]]
then
set ${DEBUG} # Activate the expand mode if DEBUG is anything but empty.
else
DEBUG=""
@ilg-ul
ilg-ul / license-mit-c-header-micro-os-plus.txt
Last active July 7, 2022 17:09
MIT license for the µOS++ project.
/*
* This file is part of the µOS++ distribution.
* (https://github.com/micro-os-plus)
* Copyright (c) 2022 Liviu Ionescu. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or
@ilg-ul
ilg-ul / .gitignore
Last active January 2, 2017 08:09
Install local build tools in $HOME/opt/ (multiple Homebrew instances and TeX)
vscode.mac.command
@ilg-ul
ilg-ul / .gitignore
Last active November 4, 2016 09:29
Install MacPorts (DEPRECATED)
.vscode
@ilg-ul
ilg-ul / bintray-test.sh
Created March 10, 2017 14:27
Bintray test script to upload Eclipse p2 repositories
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Safety settings (see https://gist.github.com/ilg-ul/383869cbb01f61a51c4d).
if [[ ! -z ${DEBUG} ]]
then
set -x # Activate the expand mode if DEBUG is anything but empty.
fi