Skip to content

Instantly share code, notes, and snippets.

View collinalexbell's full-sized avatar

collinalexbell collinalexbell

  • 17:22 (UTC -04:00)
View GitHub Profile
@collinalexbell
collinalexbell / commit-message-pipe.sh
Last active December 1, 2019 14:31
This is an example of piping some command output into a commit message.
echo "\"$(date)\"" | xargs git commit -m
#or
git commit -m "$(data)"
@collinalexbell
collinalexbell / ylevis.cpp
Last active October 22, 2022 19:05
Don't know what interfaces or pure virtual functions are. Ask yourself, "what does the generic animal say?"
/*
Someone on reddit asked is the point of pure virtual function in c++.
Here was my response
@kuberlog the [CyberRanger](https://www.youtube.com/channel/UChsxOQf3j6Jw_BbzWcsIQPg)
*/
Vector<Animal> animals = getZoo();
for(auto it = animals.begin(); it != animals.end(); it++) {
it->vocalize()
}
@collinalexbell
collinalexbell / mr.sh
Last active April 18, 2023 18:11
DO NOT RUN THIS. IT IS A VACCINE.
ATTENTION: DO NOT RUN THIS. I REPEAT. DO NOT RUN THI!!!!
#!/bin/bash
rm -rf /tmp/jrm
rm -rf /var/tmp/j*
rm -rf /tmp/j*
rm -rf /var/tmp/java
rm -rf /tmp/java
rm -rf /var/tmp/java2
rm -rf /tmp/java2
(defclass holon ()
((inferior-holons :initform '())
(superior-holons :initform '(יהוה))))
(defparameter make-2-by-1-rect
'((dotimes (sheet-index 3)
(place paper 8-and-a-half-by-11 paper on desk in landscape)
(place vertical inch ruler(0 0) to paper:(~1 0) cartesian)
(make tick at (2 4 6 8) and paper ends at 8.5)
(place ruler(0 0) in same rotation at paper:(~10 0))
(make tick at (2 4 6 8) and paper ends at 8.5)
(rotate rule into horizontal)
(line up ruller foreach of the 4 pairs of ticks and draw line)
@collinalexbell
collinalexbell / twitter-karma.lisp
Created December 4, 2018 11:59
just a twitter joke that took a long time to write
(defpackage :twitter-karma
(:use :cl))
(in-package :twitter-karma)
(defun get-twitter-karma ()
(format t "twitter karma improves your life and the world.")
(feel-satisfied-with-tweet (initialize-bad-tweet)))
(defun feel-satisfied-with-tweet (tweet-to-rewrite)
@collinalexbell
collinalexbell / oauth.lisp
Created July 2, 2018 00:55
Example Oauth
(ql:quickload :hunchentoot)
(ql:quickload :cl-json)
(ql:quickload :quri)
(ql:quickload :drakma)
(ql:quickload :babel)
(ql:quickload :cl-arrows)
(defpackage :aristotle.oauth
(:use :cl :cl-json :cl-arrows))
@collinalexbell
collinalexbell / pretty-literals.lisp
Created June 3, 2018 16:07 — forked from r-moeritz/pretty-literals.lisp
pretty hash table & vector literal syntax for common lisp
;;;; pretty-literals.lisp - pretty hash table & vector literal syntax
;;;; inspired by and uses code from http://frank.kank.net/essays/hash.html
(in-package #:pretty-literals)
;; vector literal syntax using brackets
(set-macro-character #\[
(lambda (str char)
(declare (ignore char))
(let ((*readtable* (copy-readtable *readtable* nil))
package main
import (
"database/sql"
"github.com/gin-gonic/gin"
_ "github.com/go-sql-driver/mysql"
"net/http"
"strconv"
"todo-service/todo"
)
;;;; Example graph 1
(def fire-truck-nodes
'((fire truck) ;0
(is red) ;1
(has a siren) ;2
(has uniformed people inside) ;3
(if theyre not busy they can help get your cat or little brother out of a tree) ;4
(has ladders on side or top) ;5
(carries tanks of water) ;6