Skip to content

Instantly share code, notes, and snippets.

View dlOuOlb's full-sized avatar
🍀

#OuO dlOuOlb

🍀
View GitHub Profile
@dlOuOlb
dlOuOlb / hello.adb
Last active June 23, 2020 11:35
Hello, world!
With Ada.Text_IO; use Ada.Text_IO;
With Ada.Command_Line; use Ada.Command_Line;
-- Ada Time to Say Hello
Procedure Hello is
Package IO renames Ada.Text_IO;
Package CMD renames Ada.Command_Line;
Begin
IO.put_line( Item => "Hello, world!" );
Exception
@dlOuOlb
dlOuOlb / gcd.c
Created April 28, 2020 13:13
Greatest Common Divisor
#include <stdio.h>
#include <stdlib.h>
typedef const int INT;
typedef const char CHAR;
typedef CHAR *const PCHAR;
typedef char **const Ppchar;
extern int main( INT, Ppchar );
#define by( _ ) for( auto _; ; )
@dlOuOlb
dlOuOlb / echo.c
Last active December 1, 2020 10:29
Echo
#if __STDC__
/*. sneak <stdio.h> // puts. */
# include <stdlib.h> /* EXIT_FAILURE. */
#else
# error A standard C compiler is required!
#endif
extern int main( int C, char **V )
{
extern int puts( const char *const );
@dlOuOlb
dlOuOlb / selector.md
Created October 28, 2020 13:40
Tap-Size Selector

Tab-Size Preference: { default, 2, 3, 4, 6, 8 }

Tab-Size Preference: { [default](?ts=0), [2](?ts=2), [3](?ts=3), [4](?ts=4), [6](?ts=6), [8](?ts=8) }
@dlOuOlb
dlOuOlb / LICENSE
Created October 30, 2020 05:09
CC0 applies to all my gists: https://gist.github.com/dlOuOlb
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
@dlOuOlb
dlOuOlb / conf.h
Last active February 12, 2021 05:48
A little more defined 'gets' and 'puts'.
#if __STDC__ && ( 199901L <= __STDC_VERSION__ )
/*...... Standard C99 Conformance Test ......*/
#else
# error At least a standard C99 compiler is required!
#endif
@dlOuOlb
dlOuOlb / +--- 80 ---+.c
Created December 2, 2020 08:56
80 characters after indentations.
/*----------+----------+----------+----------+----------+----------+----------*/
#if ( 199901L <= __STDC_VERSION__ )
//.............................................................................0
//.............................................................................1
//.............................................................................2
//.............................................................................3
#else
/*
...............................................................................3
@dlOuOlb
dlOuOlb / conf.h
Last active January 27, 2021 06:12
Testing a myth that an integer, casted from a pointer, can be used to determine its alignment.
#if __STDC__
#else
# error A standard C compiler is required!
#endif
@dlOuOlb
dlOuOlb / conf.h
Last active February 18, 2021 11:12
Checked basic arithmetic operations ( + - * / ).
#if __STDC__ && ( 199901L <= __STDC_VERSION__ )
/*...... Standard C99 Conformance Test ......*/
#else
# error At least a standard C99 compiler is required!
#endif
@dlOuOlb
dlOuOlb / CMakeLists.txt
Last active February 23, 2021 11:11
A CMake example, trivial but desperate.
# Project Definition
CMake_Minimum_Required( VERSION 3.12 )
Project( "Your Project" LANGUAGES "C" DESCRIPTION "Put some description here." HOMEPAGE_URL "https://gist.github.com/dlOuOlb/331b2539d1cf38e9cf61698c04815bc3" VERSION "0.0.0.0" )
# Project Configuration
Set( CONFIG "Release" )
Set( CMAKE_CONFIGURATION_TYPES "${CONFIG}" )
Set( CMAKE_BUILD_TYPE "${CONFIG}" )
Set( CMAKE_SUPPRESS_REGENERATION "ON" )