Skip to content

Instantly share code, notes, and snippets.

View yumaikas's full-sized avatar

Andrew Owen yumaikas

View GitHub Profile
yumaikas / timers.nushell
Last active May 6, 2023 04:46
Nushell snippet for timers, can be added to
View timers.nushell
def-env "timers init" [] {
if not ("~/.timers.nuon" | path exists) {
[{name: _default, start: (date now)}] | save -f ~/.timers.nuon
if not ("~/.timers_done.nuon" | path exists) {
[{name: '_default', duration: ((date now) - (date now)), ended: (date now)}] | save -f ~/.timers_done.nuon
yumaikas / LoopPosition.cs
Last active January 15, 2021 07:34
Shows if you're at the start, middle, or end of a foreach loop in C#
View LoopPosition.cs
// This code assumes that it's run as a LinqPad script, but it's just the Main() part that assumes that.
void Main()
LoopStatus(new int[]{ 1, 2, 3, 4, 5 }).Dump();
// Define other methods and classes here
public enum Iteration {
yumaikas / calculator.factor
Created August 6, 2018 06:42
An example of a calculator written (probably non-idomatic) factor.
View calculator.factor
! Copyright (C) 2018 Andrew Owen.
! See for BSD license.
ui ui.gadgets ui.gadgets.tracks ui.gadgets.labels ui.gadgets.buttons ui.gadgets.packs
ui.pens.solid ui.pens.gradient
colors colors.constants
accessors math.parser vocabs.loader io locals
models models.arrow fry
kernel strings sequences math
yumaikas /
Created June 2, 2016 00:02 — forked from jasonrudolph/
Programming Achievements: How to Level Up as a Developer
yumaikas / Count Lines of C#
Last active August 29, 2015 14:09
This is a small PowerShell Script for counting the
View Count Lines of C#
#A small script for counting lines of code for projects in a list of C# code
# directories.
# Inspired by
# In the interest of berevity, I've used the following standard powershell alias's
# ls = Get-ChildItem
# % = Foreach-Object
# ? = Where-Object
# sort = Sort-Object