Skip to content

Instantly share code, notes, and snippets.

View vy-let's full-sized avatar

Violet vy-let

  • Instructure
  • Seattle
  • 17:20 (UTC -08:00)
View GitHub Profile
@vy-let
vy-let / configuration.nix
Created July 4, 2020 04:16
Setting up NixOS for typical home SMB file sharing
...
{
services.samba = {
enable = true;
syncPasswordsByPam = true;
# You will still need to set up the user accounts to begin with:
# $ sudo smbpasswd -a yourusername

This is just a draft of an idea I had for a CLI Mastodon client. It’s by no means an actual spec, more just a list of options hinting at behavior. It’s meant to be inspired a bit by less, a bit by ed, with a hint of git-remote semantics.

  • mtd (Short for MasToDon client)
    • General Options

      These may be set in the general config.

      -n <int>
      Set the frame size for the current session, causing each browsing command to show <int> many toots at a time. This is set before moving the frame as requested, and anchors against a specific edge depending on the action. When moving the frame to newer toots, it anchors against the frame’s new edge, and when moving to older toots, it anchors against the frame’s old edge. Applicable to tail, previous, next, redisplay.
masto.example.com {
root /path/to/your/mastodon/public
gzip
rewrite {
if {path} is /
to /proxy/{uri}
}
rewrite {

Keybase proof

I hereby claim:

  • I am vy-let on github.
  • I am vy_let (https://keybase.io/vy_let) on keybase.
  • I have a public key ASAC7ZDUNedF0-bu_3EI6rrnXPOApFBTBjtLuXF3mjdWQwo

To claim this, I am signing this object:

ESC[30mESC(BESC[mWelcome to fish, the friendly interactive shell
ESC]0;fish /home/myself^GESC[?2004hESC[30mESC(BESC[m<W> fish: Current terminal parameters have rows and/or columns set to zero.
<W> fish: The stty command can be used to correct this (e.g., stty rows 80 columns 24).
ESC[2m⏎ESC(BESC[m ^M⏎ ^MESC[2KESC]0;fish /home/myself^Gmyself@ip-xxx-xx-xx-xx ESC[32m~ESC[30mESC(BESC[m> ESC[KESC[30mESC(BESC[m^MESC]0;fish /home/myself^Gmyself@ip-xxx-xx-xx-xx ESC[32m~ESC[30mESC(BESC[m> ESC[KESC[30mESC(BESC[mESC[?2004l
@vy-let
vy-let / em.rb
Created January 3, 2017 01:46
Make emacsclient work like it should
#!/usr/bin/env ruby
# Violet Baddley
# 2017
#
# Install in your favorite PATH directory as `em`
# chmod a+x
#
# usage: em [emacsclient options] [file...]
# whatever | em [emacsclient options]
import Foundation
//
// Parsley
// a little sprig of a parser
//
// Violet Baddley
//
// Written for Swift 2.2
//
// trash.sandpiper
// For moving something to the trash from the command line
// (instead of rm'ing it)
// in the Glorious Sandpiper Language.
//
// Created by Violet Baddley on 2015-8-25.
// Copyright © 2015 Violet Baddley. All rights reserved.
// Provided under the 2-Clause BSD License.
//
@vy-let
vy-let / trash.swift
Last active August 26, 2015 06:02
For moving something to the trash from the command line, instead of rm'ing it.
//
// trash.swift
// For moving something to the trash from the command line
// (instead of rm'ing it).
//
// Created by Violet Baddley on 2015-8-25.
// Copyright © 2015 Violet Baddley. All rights reserved.
// Provided under the 2-Clause BSD License.
//
@vy-let
vy-let / terminal-pinwheel.rb
Created July 29, 2015 00:40
Print a clockwise-spinning pinwheel on an ANSI-compliant terminal.
#!/usr/bin/env ruby
begin
loop do
%w( ◐ ◓ ◑ ◒ ).each do |pchar|
print "\x1b[1G\x1b[0K#{pchar} "
sleep 0.1
end
end