Skip to content

Instantly share code, notes, and snippets.

View pmoura's full-sized avatar

Paulo Moura pmoura

View GitHub Profile
@wilderlopes
wilderlopes / 30s-terminal-tools.md
Last active April 23, 2024 18:12
List of terminal-based developer tools that deliver value in 30 seconds
:- module(clpfdwsc, [go/1]).
:-use_module(library(clpfd)).
go(M) :-
wsc([[0,0,0,0]], M),
flatten(M, FM),
label(FM).
wsc([[1,1,1,1]|R], [[1,1,1,1]|R]).
@SansGuidon
SansGuidon / Dockerfile
Last active February 13, 2020 23:39
SWI-Prolog and Logtalk on CentOS/RHEL 7
FROM centos
RUN yum groupinstall -y "Development Tools" \
&& yum -y install epel-release \
&& yum clean all
RUN yum -y install \
git \
ninja-build \
libunwind \
freetype-devel \
gmp-devel \
@sol-prog
sol-prog / commands.sh
Last active March 20, 2024 14:32
Install GCC 9 on Raspberry Pi and build C++17 programs
# Commands used in the video https://youtu.be/-bCG87jBDqA :
sudo apt update && sudo apt upgrade -y
git clone https://bitbucket.org/sol_prog/raspberry-pi-gcc-binary.git
cd raspberry-pi-gcc-binary
tar -xjvf gcc-9.1.0-armhf-raspbian.tar.bz2
sudo mv gcc-9.1.0 /opt
cd ..
rm -rf raspberry-pi-gcc-binary
@mndrix
mndrix / roman.pl
Created July 10, 2015 20:49
Roman numerals in Prolog
:- use_module(library(clpfd)).
dcg(Arabic) -->
{ Arabic in 1..3999 },
roman(Arabic),
!.
roman(Total) -->
{ Rest #>= 0 },
{ Total #= Value + Rest },
@sergio-castro
sergio-castro / LogtalkLoader.java
Last active November 24, 2018 00:50
This class shows an easy way to configure Logtalk in SWI or YAP using the Jpl library, together with examples of simple invocations of Logtalk methods from Java. You need to have the jpl jar in your classpath to compile and execute this file.
import jpl.Atom;
import jpl.Compound;
import jpl.JPL;
import jpl.Query;
import jpl.Term;
/**
* This class shows how to configure Logtalk in SWI or YAP using the Jpl library.
* You need to have the jpl jar in your classpath to compile and execute this file.
@dupuy
dupuy / README.rst
Last active May 5, 2024 18:42
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.