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 / license-gpl-c-header.txt
Last active April 10, 2024 14:21
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 / short-license-mit-c-header-xpack.txt
Last active March 18, 2023 09:37
MIT license text for xPack files
/*
* This file is part of the xPack project (http://xpack.github.io).
* Copyright (c) 2022 Liviu Ionescu. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software
* for any purpose is hereby granted, under the terms of the MIT license.
*
* If a copy of the license was not distributed with this file, it can
* be obtained from https://opensource.org/licenses/mit/.
*/
@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 / 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 / bash-inits.sh
Last active April 19, 2022 13: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 / generic.mac.command
Last active September 10, 2017 20:35
macOS Finder command that calls the peer name.sh script from the same folder
#!/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
@ilg-ul
ilg-ul / script-cwd.sh
Last active September 10, 2017 20:32
Sequence to set the current folder.
# Include this part after the bash-init.sh part
script_path="$0"
if [[ "${script_path}" != /* ]]
then
# Make relative path absolute.
script_path="$(pwd)/$0"
fi
@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
@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 / 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