Skip to content

Instantly share code, notes, and snippets.

@wooosh
wooosh / maplistcomp
Created November 14, 2016 22:11
map/listcomp
print(map(lambda x: map(lambda y: x.counts=x.count(y), x.triggers), tasks))
<p>hi</p>
@wooosh
wooosh / log.json
Last active April 3, 2019 22:57
Javascript Logger
{
"colorsEnabled": true,
"defaultConf": {
"info": {
"enabled": false,
"color": "Blue"
},
"warning": {
"enabled": true,
"color": "Yellow"
const fs = require('fs')
// Define class for quick object store
class QuickStore {
constructor(loc="quickstore.json") {
this.loc = loc;
this.memObj = {};
this.queue = [];
try {
this.memObj = JSON.parse(fs.readFileSync(this.loc));
@wooosh
wooosh / bruh.sh
Created June 29, 2019 22:33
bruh
#!/usr/bin/env bash
usage() {
cat << EOF
usage: power.sh -i BATTNAME [property]
power.sh -e
power.sh -h
EOF
}
help() {
@wooosh
wooosh / hopper.c
Last active August 13, 2019 02:30
Async Module Script
#include <sys/ioctl.h>
#include <stdio.h>
#include <sys/poll.h>
#include <stdlib.h>
#include <string.h>
struct str_sized {
size_t size;
char* str;
};
@wooosh
wooosh / scarf.b
Created February 10, 2020 16:11
blang example code
typedef ScarfDesign struct {
Pattern []byte
Length int
}
// If main throws an error, the return code will be set accordingly
fn main() {
// Try will use the default error message if catch is not used
{pattern, length} := try ReadDesign()
@wooosh
wooosh / zest.md
Last active August 11, 2020 18:43
Zest Language Samples

Zest Language Samples

Types

Built-In Types (excludes standard library)

Types
Unsigned uint, u8, u16, u32, u64
Signed sint, s8, s16, s32, s64
Floats TODO

Arrays

Structures

/*
i recommend using the browser console for all of this (specifically in discord to avoid CORS issues)
get emotes in a string like the following
":yes::wmay::waveboye::wavebackboye::vibe::uwu_seal::uwu::turtwo::thonkdead::thonk::this::starkiwmi::starewut::starewow:"
no line breaks or anything
NOTE: you will need to do this in multiple batches
*/
emotes_raw = `<insert_emotes_here>`
SRC=*.c
OBJ=$(SRC:.c=.o)
DEP=$(OBJ:.o=.d)
TARGET=myprogram
.PHONY: all clean
all: $(TARGET)
$(TARGET): $(OBJ)