Skip to content

Instantly share code, notes, and snippets.

View josiah14's full-sized avatar

Josiah josiah14

  • 47 Degrees
  • Remote
View GitHub Profile
@josiah14
josiah14 / prayers-before-work.md
Last active January 13, 2020 18:53
Prayers Before Commencing Work

Troparia and Kontakia to be used during the work day

To those who stumble upon this gist, herein are contained some short prayers to the following Orthodox Christian saints:

  • Elder Porphyrios (for he was a light unto scientists, mathematicians, and engineers in the 1990's, having been givin Divine insight into the intricate workings of nature beyond the scientific knowledge of that time)
  • Saint Patrick (for he built Churches, drove out "snakes" (how many of those do we encounter in our code??), and was exiled and forced to work as a slave. He is considered officially to be a Patron of Engineers by the Church).
  • St. Hubert (for his skill with metalwork and smithing, he is also considered a patron of mathematicians and engineers)
  • St. Eligius (patron of goldsmiths, metalworkers, and of the Royal Electrical and Mechanical Engineers of the British Army)

With the exception of St. Porphyrios, all other Saints are common to the Catholic Church, as well, if there are any Catholics with interest.

@pesterhazy
pesterhazy / ripgrep-in-emacs.md
Last active March 21, 2024 18:25
Using ripgrep in Emacs using helm-ag (Spacemacs)

Why

Ripgrep is a fast search tool like grep. It's mostly a drop-in replacement for ag, also know as the Silver Searcher.

helm-ag is a fantastic package for Emacs that allows you to display search results in a buffer. You can also jump to locations of matches. Despite the name, helm-ag works with ripgrep (rg) as well as with ag.

How

@chaitanyagupta
chaitanyagupta / _reader-macros.md
Last active May 19, 2024 19:25
Reader Macros in Common Lisp

Reader Macros in Common Lisp

This post also appears on lisper.in.

Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.

Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):

The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.

@andkerosine
andkerosine / raskell.rb
Created August 15, 2012 05:56
Haskell-like list comprehensions in Ruby
$stack, $draws = [], {}
def method_missing *args
return if args[0][/^to_/]
$stack << args.map { |a| a or $stack.pop }
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :<
end
class Array
def +@
@janrubio
janrubio / setting_up_active_admin_on_heroku.md
Last active November 7, 2017 20:22 — forked from wrburgess/setting_up_active_admin_on_heroku.md
Rails App with ActiveAdmin on Heroku #rails #ruby #activeadmin #heroku
@bjodah
bjodah / mount_encfs.sh
Created August 26, 2011 22:33
Mounts an EncFS folder for sharing with other group members
#!/bin/bash
# BASH shell script for mounting an encrypted EncFS folder for
# for sharing with other user/users who are member of $GROUP
# Since EncFS runs in userland, no root privileges are needed.
# Remember to uncomment user_allow_other in /etc/fuse.conf
# It is currently configured to mount the encrypted folder:
# ~/.private
# on the unencrypted mount point (which is created upon mount):
# ~/private