Skip to content

Instantly share code, notes, and snippets.

@nebil
Last active April 14, 2023 06:43
Show Gist options
  • Save nebil/0fb016778fce7645b4ec14696c3b6acc to your computer and use it in GitHub Desktop.
Save nebil/0fb016778fce7645b4ec14696c3b6acc to your computer and use it in GitHub Desktop.
📜 My license headers 📜

GNU General Public License v3.0

Each source code file of a GPL3-licensed project should include a notice*, as recommended in this section.
For aesthetic reasons, I’ve decided to amend—just a little bit—all of the headers.

And also for any language that accepts an XML-like syntax.

<!DOCTYPE html>
<!-- Copyright (c) <year>, Nebil Kawas García

   - This program is free software: you can redistribute it and/or modify it
   - under the terms of the GNU General Public License (GPL) as published by
   - the Free Software Foundation, either version 3 of this License,
   - or (at your option) any later version.

   - This program is distributed in the hope that it will be useful,
   - but without any warranty, without even the implied warranty of
   - merchantibility or fitness for a particular purpose.
   - See the GNU General Public License for more details.

   - You should have received a copy of the GNU GPL along with this program.
   - If not, please see <https://www.gnu.org/licenses/#GPL>.             -->

<html lang='en'>
    <head>
    ...

CSS & C-family languages

For example: Java, JavaScript, Go, Rust, and Swift.

/* Copyright (c) <year>, Nebil Kawas García

 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License (GPL) as published by
 * the Free Software Foundation, either version 3 of this License,
 * or (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but without any warranty, without even the implied warranty of
 * merchantibility or fitness for a particular purpose.
 * See the GNU General Public License for more details.

 * You should have received a copy of the GNU GPL along with this program.
 * If not, please see <https://www.gnu.org/licenses/#GPL>.              */

Using a Python docstring.

"""
Copyright (c) <year>, Nebil Kawas García

This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License (GPL) as published by
the Free Software Foundation, either version 3 of this License,
or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but without any warranty, without even the implied warranty of
merchantibility or fitness for a particular purpose.
See the GNU General Public License for more details.

You should have received a copy of the GNU GPL along with this program.
If not, please see <https://www.gnu.org/licenses/#GPL>.
"""

Scripting languages

For example: Perl, Python, Ruby, and every Unix shell language.

# Copyright (c) <year>, Nebil Kawas García

# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License (GPL) as published by
# the Free Software Foundation, either version 3 of this License,
# or (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but without any warranty, without even the implied warranty of
# merchantibility or fitness for a particular purpose.
# See the GNU General Public License for more details.

# You should have received a copy of the GNU GPL along with this program.
# If not, please see <https://www.gnu.org/licenses/#GPL>.

And also for Haskell and Lua.

-- Copyright (c) <year>, Nebil Kawas García

-- This program is free software: you can redistribute it and/or modify it
-- under the terms of the GNU General Public License (GPL) as published by
-- the Free Software Foundation, either version 3 of this License,
-- or (at your option) any later version.

-- This program is distributed in the hope that it will be useful,
-- but without any warranty, without even the implied warranty of
-- merchantibility or fitness for a particular purpose.
-- See the GNU General Public License for more details.

-- You should have received a copy of the GNU GPL along with this program.
-- If not, please see <https://www.gnu.org/licenses/#GPL>.

And also for Erlang and Prolog.

% Copyright (c) <year>, Nebil Kawas García

% This program is free software: you can redistribute it and/or modify it
% under the terms of the GNU General Public License (GPL) as published by
% the Free Software Foundation, either version 3 of this License,
% or (at your option) any later version.

% This program is distributed in the hope that it will be useful,
% but without any warranty, without even the implied warranty of
% merchantibility or fitness for a particular purpose.
% See the GNU General Public License for more details.

% You should have received a copy of the GNU GPL along with this program.
% If not, please see <https://www.gnu.org/licenses/#GPL>.

License

Creative Commons License
This document is licensed under a Creative Commons 4.0 license.


* Please read this how-to document to get more information about the GPL3 and its (somewhat periphrastic) notices.

Mozilla Public License v2.0

Each source code file of a MPL2-licensed project must include, at the top, one of these headers.
For aesthetic reasons, I’ve decided to amend—just a little bit—all of the notices.

And also for any language that accepts an XML-like syntax.

<!DOCTYPE html>
<!--
Copyright (c) <year>, Nebil Kawas García
This source code is subject to the terms of the Mozilla Public License.
You can obtain a copy of the MPL at <https://www.mozilla.org/MPL/2.0/>.
-->

<html lang='en'>
    <head>
    ...

Or maybe, you’d rather use a slightly longer form.

<!DOCTYPE html>
<!-- Copyright (c) <year>, Nebil Kawas García

   - This source code is subject to the terms of the Mozilla Public License.
   - If a copy of the MPL2 was not distributed with this file,
   - You can obtain one at <https://mozilla.org/MPL/2.0/>. -->

<html lang='en'>
    <head>
    ...

CSS & C-family languages

For example: Java, JavaScript, Go, Rust, and Swift.

/*
Copyright (c) <year>, Nebil Kawas García
This source code is subject to the terms of the Mozilla Public License.
You can obtain a copy of the MPL at <https://www.mozilla.org/MPL/2.0/>.
*/

Using a Python docstring.

"""
Copyright (c) <year>, Nebil Kawas García
This source code is subject to the terms of the Mozilla Public License.
You can obtain a copy of the MPL at <https://www.mozilla.org/MPL/2.0/>.
"""

Scripting languages

For example: Perl, Python, Ruby, and every Unix shell language.

# Copyright (c) <year>, Nebil Kawas García
# This source code is subject to the terms of the Mozilla Public License.
# You can obtain a copy of the MPL at <https://www.mozilla.org/MPL/2.0/>.

And also for Haskell and Lua.

-- Copyright (c) <year>, Nebil Kawas García
-- This source code is subject to the terms of the Mozilla Public License.
-- You can obtain a copy of the MPL at <https://www.mozilla.org/MPL/2.0/>.

And also for Erlang and Prolog.

% Copyright (c) <year>, Nebil Kawas García
% This source code is subject to the terms of the Mozilla Public License.
% You can obtain a copy of the MPL at <https://www.mozilla.org/MPL/2.0/>.

License

Creative Commons License
This document is licensed under a Creative Commons 4.0 license.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment