Skip to content

Instantly share code, notes, and snippets.

(in-package :cl-user)
(defpackage :hello-world-system
(:use :asdf))
(in-package :hello-world-system)
(defsystem "hello-world"
:version "0.1.0"
:author "Jason"
:license "LLGPL"
:description "Say hi."
@jasonrobot
jasonrobot / br.pl
Last active July 6, 2018 19:41
Make a break in your terminal without clearing the screen! Give it an arg for how many lines you want (default 3).
#! /usr/bin/env perl
use strict;
my $default = 3;
my $lines = @ARGV[0] || $default;
$lines = 3 if $lines < 0;
for( my $i = $lines; $i > 0; $i-- ) {
if ( $i == ($lines / 2) ||
$i == (($lines + 1) / 2) ) {
@jasonrobot
jasonrobot / disable.rb
Last active October 6, 2018 07:21
Disable all youtube notifications for all channels
# So recently I noticed that I was getting notifications on YouTube for channels that I had not enabled any notifications for.
# I checked in the youtube settings (see the url in this script), and realized that for some reason they had ALL been
# enabled. I wanted to disable them all, but I have several hundred channels that I sub to, and didn't want to go through
# all of them and click the option.
#
# Selenium to the rescue!!!
#
# So, you need to somehow get in to a session with your account signed in. I just started the driver, put a 40 second sleep,
# then signed in manually. Then the next time I ran this script, the driver was in my session. I dunno, not used to it working
# like that.
@jasonrobot
jasonrobot / game.fnl
Created October 8, 2018 16:57
Basic loading for fennel files in lua/love
(fn love.draw []
(love.graphics.print "Hello World!" 400 300))
;;; General form
;;; CL has two fundamental pieces of syntax: ATOM and S-EXPRESSION.
;;; Typically, grouped S-expressions are called `forms`.
10 ; an atom; it evaluates to itself
:thing ; another atom; evaluating to the symbol :thing
t ; another atom, denoting true
(+ 1 2 3 4) ; an s-expression
'(4 :foo t) ; another s-expression
@jasonrobot
jasonrobot / gist:0955d9ea0e81c9fe925ec1725d4742f4
Created December 19, 2018 17:27
Code documentation guidelines
Every command, function, or variable intended for users to know about should have a documentation string.
An internal variable or subroutine of a Lisp program might as well have a documentation string. Documentation strings take up very little space in a running Emacs.
Format the documentation string so that it fits in an Emacs window on an 80-column screen. It is a good idea for most lines to be no wider than 60 characters. The first line should not be wider than 67 characters or it will look bad in the output of apropos.
Use blank lines between sections if the documentation string is long.
The first line of the documentation string should consist of one or two complete sentences that stand on their own as a summary. M-x apropos displays just the first line, and if that line's contents don't stand on their own, the result looks bad. In particular, start the first line with a capital letter and end it with a period.
@jasonrobot
jasonrobot / custom.el
Last active July 13, 2019 05:25
emacs configs because I'm too lazy to use real git
;;; package --- Summary
;; its not a package, its just all my customs
;;; Commentary:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; custom-set-variables - Dont edit below here! ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@jasonrobot
jasonrobot / markdown.md
Created August 29, 2019 05:58
markdown vs org

An h1 header

Paragraphs are separated by a blank line.

2nd paragraph. Italic, bold, and monospace. Itemized lists look like:

  • this one
  • that one
@jasonrobot
jasonrobot / demo.js
Last active December 4, 2019 22:33
A little demonstration of Ramda
import * as R from 'ramda'
// Setting up some date to play with
const foo = {
validate() {
return this.x < 69 && (typeof this.name === 'string');
},
x: 420,
name: Symbol('lul')
}

Considerations for the top 10

Most listened albums in Google Music Compositional quality of the album as a whole. Personal, historical attachment to the band or album. Comparison to other albums that are being considered.

The top 10, in no order

  • Intronaut - Direction of Last Things

What can I say, I'm crazy about Intronaut. I found this album in 2015, just after getting back in to programming, so it has a bit of recent sentimentality to it for me too. It's also just a fantastic album.