Skip to content

Instantly share code, notes, and snippets.

@XlogicX
XlogicX / games.md
Last active May 13, 2024 07:42
List of Boot Sector Gamers

Boot Sector Games

A list of playable boot sector games, most of which are on github. Fun to play, great to learn from. There are also many cool non-booting boot sectors out there that aren't games (so more like demos), but this page is just reserved to interactive boot sectors / games. This list is also not complete, but not on purpose, it is a best effort collection of games, so if you know of any fun boot sector games, please contribute.

This page lists a collection of 31 games spanning several authors: nanochess, me, daniel-e, shikhin, JulianSlzr, XanClic, QiZD90, darkvoxels, guyhill, w-shackleton, egtzori, VileR, ish_works, franeklubi, queso_fuego, franeklubi, Jethro82, waternine9, tevoran, palma3k, taylor-hartman. peterferrie should also be mentioned as he has touched a lot of these games.

TetrOS

https://github.com/daniel-e/tetros

Tetris Clone. Full color, no score. This was one of the older boot sector games out there. ![tetros](https://gist.github.com/assets/1570856/3a0d1023-cbe6-4b4d-

Introduction

I was recently asked to explain why I felt disappointed by Haskell, as a language. And, well. Crucified for crucified, I might as well criticise Haskell publicly.

First though, I need to make it explicit that I claim no particular skill with the language - I will in fact vehemently (and convincingly!) argue that I'm a terrible Haskell programmer. And what I'm about to explain is not meant as The Truth, but my current understanding, potentially flawed, incomplete, or flat out incorrect. I welcome any attempt at proving me wrong, because when I dislike something that so many clever people worship, it's usually because I missed an important detail.

Another important point is that this is not meant to convey the idea that Haskell is a bad language. I do feel, however, that the vocal, and sometimes aggressive, reverence in which it's held might lead people to have unreasonable expectations. It certainly was my case, and the reason I'm writing this.

Type classes

I love the concept of type class

@sorahn
sorahn / Laws of Computer Programming.md
Last active September 15, 2023 17:54
COMPUTER© 1980 ART 101 Limited, Atlanta Georgia - Kenneth Grooms

laws of computer programming

  • any given program, when running, is obsolete.
  • if a program is useless, it will have to be documented.
  • if a program is useful, it will have to be changed.
  • any program will expand to fill all available memory.
  • the value of a program is proportional to the weight of its output.
  • program complexity grows until it exceeds the capability of the programmer to maintain it.
  • make it possible for programmers to write in english and you will find that programmers cannot write in english.

rules of pratt

@htfy96
htfy96 / static_inline_example.md
Last active April 11, 2024 14:13
static inline vs inline vs static in C++

In this article we compared different behavior of static, inline and static inline free functions in compiled binary. All the following test was done under g++ 7.1.1 on Linux amd64, ELF64.

Test sources

header.hpp

#pragma once

inline int only_inline() { return 42; }
static int only_static() { return 42; }
@unhammer
unhammer / use_gold.sh
Last active June 3, 2022 02:31
Linking with lld on Ubuntu/Debian in CMake projects (or gold in automake projects)
sudo apt install binutils
cd ~/src/an_autotools_project
export CXXFLAGS='-fuse-ld=gold'
export CFLAGS='-fuse-ld=gold'
./configure
make -j4 # no longer wait for linking! =D
# gcc doesn't support -fuse-ld=lld http://gcc.gnu.org/ml/gcc-patches/2016-07/msg00145.html :(
@marcan
marcan / linux.sh
Last active December 1, 2023 15:18
Linux kernel initialization, translated to bash
#!/boot/bzImage
# Linux kernel userspace initialization code, translated to bash
# (Minus floppy disk handling, because seriously, it's 2017.)
# Not 100% accurate, but gives you a good idea of how kernel init works
# GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st>
# Based on Linux 4.10-rc2.
# Note: pretend chroot is a builtin and affects the current process
# Note: kernel actually uses major/minor device numbers instead of device name
@benediktg
benediktg / pam_kwallet-guide.md
Last active May 14, 2023 14:48
Short guide for pam_kwallet with KDE Plasma 5 on openSUSE

(based on these two blog entries and inspired by Fedora-Blog)

First install pam_kwallet:

sudo zypper in pam_kwallet

Then edit the files /etc/pam.d/passwd, /etc/pam.d/login and /etc/pam.d/sddm as follows, i.e. add the lines beginning with a - (the hyphens are valid PAM syntax to reduce log entries if these PAM modules should not exist) and ending with the ### comment:

/etc/pam.d/passwd :

@joepie91
joepie91 / analysis.md
Created April 26, 2016 16:41
Malware from sharebutton.to / sharebutton.org

Miscellaneous information:

sven@linux-etoq:~/projects/working/sharebutton-to-malware> host sharebutton.to
sharebutton.to has address 64.13.232.232
sharebutton.to mail is handled by 10 mail.sharebutton.to.
sven@linux-etoq:~/projects/working/sharebutton-to-malware> host sharebutton.org
sharebutton.org has address 64.13.232.232
sharebutton.org mail is handled by 10 mail.sharebutton.org.
sven@linux-etoq:~/projects/working/sharebutton-to-malware> host cdn.script.to
@furkanmustafa
furkanmustafa / watch-video.sh
Last active January 11, 2020 01:42
Simple script to watch streaming videos with mpv and youtube-dl
#!/bin/sh -e
#
# Public domain
# Author: roman [] tsisyk.com
# Modified By: furkan [] s2n.io 2014.10.19, added cache parameter and deleting cookie file
#
# Usage: ./me url [youtube-dl parameters]
#
TMPDIR=/tmp