Skip to content

Instantly share code, notes, and snippets.

View nothingface0's full-sized avatar
🦝

Dimitris Papagiannis nothingface0

🦝
View GitHub Profile
@mathieucaroff
mathieucaroff / download-buidl-and-install-ghdl.sh
Created September 28, 2018 09:50
Download build and install GHDL on Ubuntu 18.04 (tested 2018-09-28)
#!/bin/sh
#
# download-buidl-and-install-ghdl.sh
#
# It took about 5 minutes on my laptop (2018-09-28).
sudo apt update
sudo apt install -y git make gnat zlib1g-dev
git clone https://github.com/ghdl/ghdl
cd ghdl
@mpusz
mpusz / alternatives.sh
Last active October 16, 2025 14:52
Ubuntu scripts
#/bin/bash
sudo update-alternatives --remove-all gcc
sudo update-alternatives --remove-all g++
sudo update-alternatives --remove-all clang
sudo update-alternatives --remove-all clang++
sudo update-alternatives --remove-all cc
sudo update-alternatives --remove-all c++
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7
@nilput
nilput / sockets.c
Last active November 14, 2024 13:48
C socket server/client example, handles multiple clients on a single thread, single process.
//C tcp server/client example
// some of this is based on https://gist.github.com/oleksiiBobko/43d33b3c25c03bcc9b2b
// which has a couple of problems in the time of writing this.
//
// this handles multiple clients without blocking, without threads, without multiprocessing, using poll()
//
// Author: github.com/nilput <[email protected]>
// license: BSD-3