This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local points = {} | |
local trails = {} | |
local N = 100 | |
local w,h = love.graphics.getDimensions() | |
print(w,h) | |
local function color(x,y) | |
local th = (x+y)/20 | |
return {(math.cos(th)+1)/2, (math.sin(th)+1)/2, (math.cos(th+math.pi/2+1))/2} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
if [[ -f ~/unjscal ]]; then | |
echo "dont calibrate" | |
rm ~/unjscal | |
exit | |
fi | |
#---joydev cal--- | |
jscal -s 8,1,0,135,135,11184469,20648251,1,0,116,116,13094012,14509581,1,0,126,126,5711218,5899500,1,0,28,28,107370905,2618802,1,0,30,30,178951509,2606089,1,0,127,127,5835375,5592234,1,0,0,0,536854528,536854528,1,0,0,0,536854528,536854528 /dev/input/js0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////////////////////////////////////////////////////////////// | |
// | |
// Copyright (c) 2019 lemon sherbet | |
// | |
// This software is provided 'as-is', without any express or implied warranty. | |
// In no event will the authors be held liable for any damages arising from | |
// the use of this software. | |
// | |
// Permission is granted to anyone to use this software | |
// for any purpose, including commercial applications, and to alter it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
import sys, os, subprocess, re | |
if len(sys.argv) < 2: | |
print("""\ | |
usage: neocpkg <command> [neocities website name | website/pkg] | |
commands: | |
init\t create a repo here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SDL2/SDL.h> | |
#include<math.h> | |
enum {FALSE ,TRUE}; | |
enum {W=600,H=400}; | |
int _SCROLLX = 0; | |
int _SCROLLY = 0; | |
SDL_Surface* screen; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdint.h> | |
#include <cstdio> | |
#include <iostream> | |
#include <cmath> | |
typedef struct fix32 { | |
int32_t n; | |
static const int32_t FACTOR = (1<<16); | |
//constructor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
""" | |
usage: mmacrofmt.py [tabsize] < infile > outfile | |
formats something like: | |
#define X(a) \ | |
whatever \ | |
missing a backslash | |
//some comment | |
hmm\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python | |
import subprocess, json, re, shutil, os | |
srcurl = "https://ziglang.org/download/index.json" | |
tmppath = "/tmp/zig-master.tar.xz" | |
print(" > downloading index...") | |
src = subprocess.check_output(["curl", "-L", srcurl]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const assert = std.debug.assert; | |
const trait = std.meta.trait; | |
//example: | |
// BitReg(u32, .{ | |
// .{.first_4_bits, 0, 4}, | |
// .{.next_7_bits, 4, 7}, | |
// }) | |
pub fn BitReg(comptime T: type, comptime fields: anytype) type { | |
const check_or = struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python3 | |
import sys, string | |
def str_findp(start, s, pred): | |
for i in range(start,len(s)): | |
if pred(s[i]): | |
return i | |
return None | |
#takes a list of lines as template for the ascii art; and a list of tokens (for example, words) to replace it with |
OlderNewer