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 / 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 / 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 / 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 / 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 November 4, 2016 09:29
Install MacPorts (DEPRECATED)
.vscode
@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 / 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 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-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 / 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"/>