Skip to content

Instantly share code, notes, and snippets.

View ynx0's full-sized avatar
🥴
← clueless

Yaseen ynx0

🥴
← clueless
View GitHub Profile
@beesandbombs
beesandbombs / gridWaves.pde
Created October 5, 2018 12:47
grid waves
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
if (p < 0.5)
return 0.5 * pow(2*p, g);
@infval
infval / emuparadise.download.user.js
Last active October 22, 2025 04:23
emuparadise.me download workaround (Most games + Sega Dreamcast, Books/Comics/Guides/Magazines)
// ==UserScript==
// @name EmuParadise Download Workaround
// @version 1.2.3
// @description Replaces the download button link with a working one
// @author infval (Eptun)
// @match https://www.emuparadise.me/*/*/*
// @grant none
// ==/UserScript==
// https://www.reddit.com/r/Piracy/comments/968sm6/a_script_for_easy_downloading_of_emuparadise_roms/
// TeXworksScript
// Title: Search and Replace
// Description: search and replace like word (support wildcase)
// Author: KR
// Version: 0.1
// Date: 2019-1-17
// Script-Type: standalone
// Context: TeXDocument
// Shortcut: Ctrl+shift+H

Installing Shadowsocks with v2-ray

Start by installing all the dependencies

#Start by installing shadowsocks
sudo apt update
sudo apt-get install shadowsocks-libev -y

#Install tmux, used to create the daemon
@mattnewport
mattnewport / planetppm.hoon
Created August 29, 2019 03:54
Procedural Planet raytracer in Hoon
|= dim=@ud ^- (list @t)
=/ dx (div:rs .1 (sun:rs dim))
=/ white [.1 .1 .1]
=< (genppm dim)
|%
++ min
|= [x=@rs y=@rs] ^- @rs
?: (lth:rs x y) x y
++ max
|= [x=@rs y=@rs] ^- @rs
@lukechampine
lukechampine / fac.hoon
Last active August 24, 2024 20:11
Evolution of a Hoon Programmer
:: Hoonlet
::
|= n=@
?: =(n 0)
1
(mul n $(n (dec n)))
::
:: Commie Hoontard
:: (...daydreaming of his very own Type 59...)
::
@tylershuster
tylershuster / graph-store-notes.hoon
Last active November 22, 2020 01:28
Notes on @loganallenc's graph store
|%
+$ resource [=ship =term] :: A resource is a ship and a term.
+$ resources (set resource) :: Resources are a set of resources
::
+$ network :: A network is like a social network...think subreddits or twitter lists or are.na collections. A node may occupy many positions in a network by being under multiple graphs
$: graphs=(map resource (unit graph)) :: A list of resources (like [~zod %rants]) to a graph (a map of entities to nodes). Like on ~marpem/%permaculture, ~radbur-sivmus has a collection of saved posts about soil health
tags=(set term) :: tags, which are the terms used in the network (a list of communities, perhaps, or more generally the way people categorize things on the network)
tag-queries=(map term resources) :: tag-queries are terms mapped to resources. So %my-posts = (set resource), or /r/permaculture = (set resource)
==
::
@senderle
senderle / hand-modify-pdf.md
Created September 23, 2020 15:03
So you want to modify the text of a PDF by hand

So you want to modify the text of a PDF by hand...

If you, like me, resent every dollar spent on commercial PDF tools, you might want to know how to change the text content of a PDF without having to pay for Adobe Acrobat or another PDF tool. I didn't see an obvious open-source tool that lets you dig into PDF internals, but I did discover a few useful facts about how PDFs are structured that I think may prove useful to others (or myself) in the future. They are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.

@belisarius222
belisarius222 / vars.md
Last active December 18, 2020 03:48
Hoon variable naming proposal

It's useful to have standard names for types, but it's also useful to have standard names for variables. In Hoon, we strive for unambigious and fast pronounceability. If you read a Hoon program to me over the phone, I should be able to dictate it perfectly without wondering how something is spelled. While this goal is probably not completely achievable, we can get a lot closer than we are right now. I propose a scheme for getting close to this.

In many programming languages, single-letter variable names are common. In Hoon, these are called "ultra-lapidary style". These usually satisfy Hoon's pronunciation requirement, but they do not map naturally onto meaningful concepts except when the number of variables is very low. For a comparator function, taking in 'a' and 'b' is fine. But for arguments whose meaning is more semantic than positional, which is most of the time, a name should have some mnemonic connection to the value it signifies.

The natural way to do this is a full word, which should be c