Skip to content

Instantly share code, notes, and snippets.

@kuhnza
kuhnza / http-request-dumper.js
Last active May 3, 2024 13:59
A simple node server that dumps raw incoming http requests out to the command line.
var http = require('http');
var LISTEN_ON_PORT = 3000;
function toTitleCase(str) {
return str.replace(/[a-z]*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();});
}
http.createServer(function (req, res) {
var body;
@tcoppex
tcoppex / c_nostd.txt
Last active May 3, 2024 13:58
Writing C software without the standard library [Linux Edition] - Franc[e]sco's Gopherspace
###################################################################
Writing C software without the standard library
Linux Edition
###################################################################
There are many tutorials on the web that explain how to build a
simple hello world in C without the libc on AMD64, but most of them
stop there.
I will provide a more complete explanation that will allow you to
build yourself a little framework to write more complex programs.
@gijigae
gijigae / install-dify.sh
Last active May 3, 2024 13:57
Shell script to install Dify
#!/bin/bash
# Install Docker
curl -fsSL https://get.docker.com -o install-docker.sh
sh install-docker.sh
# Clone the GitHub repository
git clone https://github.com/langgenius/dify.git
# Navigate to the desired directory
@nk23x
nk23x / build.prop.tweaks
Last active May 3, 2024 13:57
build.prop tweaks in common raw format (edit needed to adapt to device)
#
# TWEAKS
#
# Qualcomm
#com.qc.hardware=true
#debug.qctwa.statusbar=1
#debug.qctwa.preservebuf=1
#debug.qc.hardware=true
@pancelor
pancelor / README.md
Last active May 3, 2024 13:55
aseprite to pico8/picotron exporter

picotron is in early alpha -- it doesn't seem to have a sprite editor yet but it does support sprites in a particular format, so I threw together this aseprite exporter.

picotron is out! importing sprites is still a bit tricky, so I built this script to help, along with this picotron cart

this script works great for pico8 too -- I use it often

how to use

you'll need Aseprite to use this.

@HimDek
HimDek / Install Android apps or apk files in Windows using Windows Subsystem for Android (No Emulator).md
Last active May 3, 2024 13:49
This Guide will show you how to install and run apk files or Android apps in any Edition of Windows 11 using Windows Subsystem for Android. WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator.

Install Android apps or apk files in Windows using Windows Subsystem for Android

WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator. The problem is Windows Subsystem for Android is currently only available through preview via the Beta Channel of the Windows Insider Program. But if you follow my guide, you don't have to be in Windows Insider Program to try it out. The only thing you need is Windows 11 installed and some patience.

Prerequisites:

  • Windows Subsystem for Android or WSA must be Installed.

Click here to view the guide that shows how to install Windows Subsystem for Android in any Edition of Windows 11 (including Windows 11 Home) non Inider or stable release.

How to Install Android Apps or apk files in Windows Subsystem for Android:

@munrocket
munrocket / wgsl_2d_sdf.md
Last active May 3, 2024 13:49
WGSL 2D SDF Primitives

WGSL 2D SDF Primitives

Revision: 06.08.2023, https://compute.toys/view/398

Circle - exact

fn sdCircle(p: vec2f, r: f32) -> f32 {
  return length(p) - r;
}
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 3, 2024 13:48
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@HimDek
HimDek / Hyper-V in Windows 10 and Windows 11 Home Edition.md
Last active May 3, 2024 13:48
Hyper-V is supported in Pro, Enterprise and Education Edition of Windows 10 and Windows 11. This guide will show you how to enable Hyper-V in Home Editions of Windows 10 and Windows 11.

Hyper-V in Windows 10 and Windows 11 Home Edition

Hyper-V in Windows 10 and Windows 11 allows running Virtual Machine. It is supported only in Pro, Enterprise and Education Edition of Windows 10 and Windows 11 by default. But this guide will show you how to enable it in Home Editions of Windows 10 and Windows 11.

Check if virtualization is enabled:

  • Search for Command Prompt in Windows Start Menu and open it.
  • Type systeminfo and press Enter. Wait for the process to finish
  • Once the results appear, search for the Hyper-V Requirements section which is usually the last one. 11
    • If it says A hypervisor has been detected. Features required for Hyper-V will not be displayed. that means Hyper-V is already enabled and there is no reason following this guide anymore.
  • Otherwise, check for Virtualization Enabled in Firmware:.
@VideoCarp
VideoCarp / lexing.md
Last active May 3, 2024 13:43
Basics of lexing

Lexing for beginners

This is a guide that should teach you how to perform basic lexing in a functional programing language.
Everything was written in Elixir, but you should be able to follow it if you are using any functional programming language.
Or even an imperative programming language like Python, C or Java.\

What is lexing?

The first question you should ask yourself is, what is lexing? It's the same as tokenising, scanning or lexical analysis.
That might not help you if you haven't heard of these either. Put simply, lexing is the process of breaking down a string
into meaningful units, indepdendent of context.
What a lexer will do is make the following happen: