Skip to content

Instantly share code, notes, and snippets.

View lprib's full-sized avatar
🐡

Liam Pribis lprib

🐡
View GitHub Profile
var SMOOTHING_AMOUNT = 20;
var FADEOUT_COEF = 0.5;
let PIXEL_SIZE = 20;
let MIN_SIZE = 2;
let MAX_SIZE = 5;
let NUM_DOTS_MIN = 2;
let NUM_DOTS_MAX = 5;
scene = [];
import java.util.*;
List<SceneObject> scene;
float SMOOTHING_AMOUNT = 150;
// lower = more edge fadeout
float FADEOUT_COEF = 0.05;
float FADEOUT_COEF_LOG = 1;
void setup() {
size(600, 600);
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# replace quotes with unicode accent diacritics for anki flashcards
import sys
chars = ""
with open(sys.argv[1], encoding="utf-8") as cardfile:
chars = cardfile.read()
ArrayList<Follower> f = new ArrayList<Follower>();
int NUM_FOLLOWERS = 3000;
class PID {
float kp, ki, kd;
float prevError = 0;
float integral = 0;
int prevMillis = 0;
import java.util.Random;
class Point {
double x, y;
Point(double x, double y) {
this.x = x;
this.y = y;
}
}
@lprib
lprib / ranger-desktop.desktop
Last active November 27, 2019 04:06
desktop file is in ~/.local/share/applications, the corresponding mimetype entry is in .local/share/applications/default.list for inode/directory mimetype
[Desktop Entry]
Type=Application
Name=Ranger
Comment=File Manager
MimeType=inode/directory
Categories=Utility;FileManager
Exec=/home/liam/Applications/ranger-term %f
Path=/home/liam/Applications[Desktop Entry]
Type=Application
Name=Ranger
int searchSize = 1000;
int[] list = {0};
int index = 0;
int maxVal;
int prevMaxVal = 0;
int windowSize = 1;
void setup() {
size(1000, 1000);
//! This defines primitives that plugins may use to provide their own library functions to the language.
//!
//! Plugins must be compiled/linked as a C dynamic library, and provide the following public functions:
//! - `fn get_library_functions() -> FfiLibraryFunctionsVec`
//! - `fn dealloc_library_functions_vec(FfiLibraryFunctionsVec)`
//!
//! This api can easily be provided by using the library! macro and supplying all of the plugin's intrinsic functions.
use std::ffi::{c_void, CString};
use std::os::raw::c_char;
@lprib
lprib / o.txt
Created October 17, 2019 21:57
test
test
test
test
test
test
test
test
import sys
import socket
def main():
if len(sys.argv) != 4:
print("expected 3 args, got {}".format(len(sys.argv) - 1))
sys.exit(1)
hostname = sys.argv[1]
port = sys.argv[2]