Skip to content

Instantly share code, notes, and snippets.

View epilys's full-sized avatar

Manos Pitsidianakis epilys

View GitHub Profile
@h3r2tic
h3r2tic / raymarch.hlsl
Last active May 23, 2024 12:50
Depth buffer raymarching for contact shadows, SSGI, SSR, etc.
// Copyright (c) 2023 Tomasz Stachowiak
//
// This contribution is dual licensed under EITHER OF
//
// Apache License, Version 2.0, (http://www.apache.org/licenses/LICENSE-2.0)
// MIT license (http://opensource.org/licenses/MIT)
//
// at your option.
#include "/inc/frame_constants.hlsl"
@benjamindblock
benjamindblock / example.groff
Last active August 7, 2023 23:35
GNU roff (groff) - a sane example for text files
\# Ref: https://www.gnu.org/software/groff/manual/html_node/gtroff-Reference.html
\# Ref: `man 7 groff`
\# Basic groff file that can be used for formatting a plain text document.
\# These are some sane defaults and examples for writing documents.
\#
\# Hyphenation modes 1, 4, 8 enabled
\# Eg., Do not hyphenate the first or last two letters.
.hy 12
\#
\# Number of characters per-line in the \nl register.
@andrewstiefel
andrewstiefel / feed.xml
Created January 24, 2022 18:43
Simple XSL boilerplate for styling Atom feeds in Jekyll
---
---
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/feed.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.title }}</title>
<link href="{{ site.url }}{{ site.baseurl }}/feed.xml" rel="self"/>
<link href="{{ site.url }}{{ site.baseurl }}/" rel="alternate"/>
@rain-1
rain-1 / docker node tip.txt
Last active December 24, 2021 07:04
Easily build NodeJS projects inside a docker container
Here's a quick dockerfile:
----------------8<-------------[ cut here ]------------------
FROM debian:latest
RUN apt-get update && apt-get install -y nodejs npm
----------------8<-------------[ cut here ]------------------
save that as Dockerfile and do: docker build -t node-builder .
@broofa
broofa / checkForUndefinedCSSClasses.js
Last active January 21, 2024 17:22
ES module for detecting undefined CSS classes (uses mutation observer to monitor DOM changes). `console.warn()`s undefined classes.
/**
* Sets up a DOM MutationObserver that watches for elements using undefined CSS
* class names. Performance should be pretty good, but it's probably best to
* avoid using this in production.
*
* Usage:
*
* import cssCheck from './checkForUndefinedCSSClasses.js'
*
* // Call before DOM renders (e.g. in <HEAD> or prior to React.render())
@nevans
nevans / IMAP-RFCs.md
Last active November 28, 2023 12:48
IMAP Specifications

IMAP specifications

(TODO) All IANA registered IMAP capabilities, response codes, keywords, mailbox attributes, the most relevant SASL mechanisms, and other relevant specifications.

  • ⛔️: obsolete specifications that have been deprecated or replaced
  • ⏭️: extensions that have been completely or partially included in [IMAP4rev2].
  • ✨: extensions that are recommended for [IMAP4rev2] servers and clients. The IETF EXTRA WG decided that requiring them as a part of IMAP4rev2 would push the bar to implement too high for new implementations.
  • 🗑: extensions that have been completely or partially deprecated or removed in [IMAP4rev2].
  • 🍋: extensions that are included in the "Lemonade" profile [RFC5550].
@bonzini
bonzini / mbox_split.py
Last active March 30, 2024 02:40
Split a mailbox into separate patch files, stripping the transfer encoding and minimizing the headers along the way.
#! /usr/bin/env python3
# mbox_split.py
#
# Split a mailbox into separate patch files, stripping the transfer encoding
# and minimizing the headers along the way.
#
# Written by Paolo Bonzini <pbonzini@redhat.com>
import argparse
// tested using nix 0.15.0
extern crate nix;
use std::path::Path;
use nix::pty::{posix_openpt, grantpt, unlockpt, ptsname};
use nix::fcntl::{OFlag, open};
use nix::sys::{stat, wait};
use nix::unistd::{fork, ForkResult, setsid, dup2};
use nix::libc::{STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO};
@cb372
cb372 / riscv.md
Last active May 9, 2024 07:27
Writing an OS in Rust to run on RISC-V

(This is a translation of the original article in Japanese by moratorium08.)

(UPDATE (22/3/2019): Added some corrections provided by the original author.)

Writing your own OS to run on a handmade CPU is a pretty ambitious project, but I've managed to get it working pretty well so I'm going to write some notes about how I did it.

@djotto
djotto / mp4.sh
Created May 20, 2017 12:33 — forked from anonymous/mp4.sh
Merge multiple mp4 files as chapters
#! /usr/bin/env bash
####################################################
# Required Libraries
#
# library name | commands used | verified version
# ------------------------------------------------
# ffmpeg | ffmpeg/ffprobe | 3.1.4 3.2
# gpac | mp4box | 0.6.1
# mp4v2 | mp4chaps | 2.0.0