Skip to content

Instantly share code, notes, and snippets.

View tomodachi94's full-sized avatar

Tomo tomodachi94

View GitHub Profile
@jenningsb2
jenningsb2 / baileys-obsidian-method.md
Last active February 27, 2024 19:55
Some simple things to keep in mind when starting out with Obsidian

Obsidian Workflow Primitives

  • Optimize for speed of capture, speed of retrieval, and then organization, in that order.
  • Just because Obsidian can do something (because it can basically do anything) doesn't mean it should. Think of Obsidian as Apple Notes with super powers. Don't overcomplicate things.
  • If in doubt, just create a new file. Don't be afraid to create new files even for small things. You can always 'update' or merge them with other files later (look for 'merge' in the command palette).
  • Use a single 'scratch-type' note as your home base, and put most of your todos there. I use the Weekly Note from the Periodic Notes plugin as my homepage.
    • Tip: I use the 'Homepage' plugin to make my Weekly Note my 'default state'
      • image
    • See: https://stephango.com/todos
    • Specific tasks associated with a project can go on the project-specific
@ms3056
ms3056 / README.md
Last active March 13, 2024 14:31
Timeline template

image

Version History

  • V1 - initial release
  • V2: cleaned up the code a little, removed the black background behind the current day text as it wasn't precise. I left the code in there - just uncomment it. Removed an indent at the end to prevent breaking the SVG - thanks q on Discord!

Note

  • Reading View is BROKEN - wait for the plugin (assuming no surprises await me there). TBD - (when it gets done)™
  • Live Preview works as it should
  • Adjustments can be made at the top of the file
@lorenzleutgeb
lorenzleutgeb / committer-progress.sh
Last active July 9, 2024 14:13
Nixpkgs Committer Progress
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p bash gh
set -eu
# See <https://gist.github.com/lorenzleutgeb/239214f1d60b1cf8c79e7b0dc0483deb>.
# Will exit non-zero if not logged in.
gh auth status
if [ $# == 1 ]
---This is a library to handle mass 16 color printing in ComputerCraft.
-- This requires abstractInvLib https://gist.github.com/MasonGulu/57ef0f52a93304a17a9eaea21f431de6
-- Copyright 2023 Mason Gulu
-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
@znepb
znepb / farm.lua
Last active January 16, 2023 17:21
--- Setup
-- This program requires Tuttle: https://gist.github.com/znepb/72981ce3e7a2e1f4e3423ed0b2ca9510
-- The turtle's home should have a chest below (the output chest) and a chest above (the fuel chest).
-- As well as this, there should be NO OBSTACLES within the farm's area. They will be destroyed over time as the farm works.
--- Configuration Section
-- The block to search for and dig
local block = "minecraft:wheat"
-- The item to deposit into chests
local item = "minecraft:wheat"
@znepb
znepb / tuttle.lua
Last active January 16, 2023 07:14
Tuttle: A simple ComputerCraft turtle pathfinding API.
-- A simple turtle pathfinding API for ComputerCraft.
--[[
Copyright 2023 Marcus Wenzel
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to
do so, subject to the following conditions:
@MasonGulu
MasonGulu / billboard.lua
Last active May 17, 2023 04:31
Simple program for displaying BIMG files on a term capable peripheral
local function resetPalette(periph)
local mon
if periph == "term" then
mon = term
else
mon = assert(peripheral.wrap(periph), periph.." is not a valid peripheral")
end
for i = 0, 15 do
mon.setPaletteColor(2^i, term.nativePaletteColor(2^i))
@MCJack123
MCJack123 / sane-api.md
Created June 6, 2022 04:13
On Writing a Sane API

On Writing a Sane API

Over my years on the ComputerCraft Discord server, I've had the opportunity to witness the creation of numerous APIs/libraries of all sorts. I've gotten to examine these APIs in depth, as well as answer questions involving the APIs that the creators or users have. As an API designer myself, I compare the designs of other APIs with my designs, and I've noticed a number of patterns that make or break an API design. I've seen plenty of designs that make me go "WTF???", and lots that I just can't understand, even at my advanced level of programming (not to toot my own horn).

This article outlines some rules for making a sane API, which is easy to use, understandable, and doesn't make the user spin in circles to make things with it. Note that when I use the term "API", I'm primarily referring to code libraries and their public interfaces, but a number of points can be applied to web APIs as well. Since I have the most experience in Lua APIs, I'll be focu

@MCJack123
MCJack123 / on-writing-an-os.md
Last active May 28, 2024 16:07
On Writing a ComputerCraft OS

On Writing a ComputerCraft OS

One of the most common projects I've seen for ComputerCraft is to write an operating system. People look at the limited command-line interface that CraftOS provides, and think, "I want this to work like my normal computer does!" Time and time again, a new post pops up on the ComputerCraft forums or Discord either announcing an OS, or asking for help with an OS, or releasing an OS. Usually, there are some very obvious flaws in these "OS"es, ranging from poor design choices, to overstating what they are and underdelivering. There are many common misunderstandings and undersights that newbie developers run into when writing an operating system, and these end up creating mediocre products at best.

A Critical Distinction

The term "OS" is thrown around a lot, and in my opinion it's very overused. According to [Wikipedia]: "An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs." However, m

@fern9001
fern9001 / nixos-vim-guide.md
Last active February 9, 2024 18:13
Fern's NixOS Vim Guide

Fern's NixOS Vim Guide

A newbie friendly guide to configuring Vim in NixOS

File Structure

Create the following file struture in /etc/nixos

/etc/nixos
    |-- apps
        |-- vim
            |-- default.nix 
            |-- vimPlugins.nix