Skip to content

Instantly share code, notes, and snippets.

View gosukiwi's full-sized avatar

Federico Ramirez gosukiwi

View GitHub Profile
@gosukiwi
gosukiwi / common-lisp-cheatsheet.md
Last active April 16, 2024 13:59
Common Lisp Cheatsheet

Common Lisp Cheatsheet

Common Lisp is a general-purpose programming language with functions as first-class citizens. Don't worry about being purely functional, Lisp is Object Oriented too. CLOS is a very powerful object-oriented system!

Useful definitions

The Common Lisp lingo is quite unique:

  • Package: Basically a namespace, a place for symbols to live
  • System: Basically a Library. A bunch of code plus some instructions how it should be treated, for example which other systems it depends on, what should be loaded and/or compiled first, etc. Not in ANSI lisp but widespread. The most common system definition tool is ASDF.
  • Modules: Deprecated and implementation-dependent
  • Quicklisp: Like NPM or Ruby Gems for ASDF Systems.
@redrick
redrick / rspec_rails_cheetsheet.rb
Last active October 23, 2022 21:00 — forked from nerdinand/rspec_rails_cheetsheet.rb
New expect syntax + new hash syntax and couple corrections
#Model
expect(@user).to have(1).error_on(:username) # Checks whether there is an error in username
expect(@user.errors[:username]).to include("can't be blank") # check for the error message
#Rendering
expect(response).to render_template(:index)
#Redirecting
expect(response).to redirect_to(movies_path)
@phansch
phansch / yardoc_cheatsheet.md
Last active March 1, 2024 18:17 — forked from chetan/yardoc_cheatsheet.md
Improved YARD cheatsheet
@gosukiwi
gosukiwi / fuzzy_search.md
Last active June 15, 2016 19:25
Fuzzy Search

Usage: zf PATTERN [DIR]

Example: zf foo app/

Paste this somewhere. I use it in /usr/local/bin. Remeber to chmod +x /usr/local/bin/zf.

if [ -z "$1" ]
  then
 echo "usage: zf PATTERN [DIR]"
@gosukiwi
gosukiwi / README.md
Last active February 25, 2016 19:33
alpha_sapphire

alpha_sapphire is a toy programming language concept. Designed for minimal syntax and fully object-oriented expressiveness a-la Smalltalk and Ruby.

Things trying to archieve:

  • Everything should be an object
  • Meta-programming should be easy
  • Syntax shold be minimal yet expressive
  • Should be inspired by Smalltalk and Ruby
  • Should give the power to the programmer, not limit him
@bpierre
bpierre / README.md
Last active February 15, 2024 18:40
Switch To Vim For Good

Switch To Vim For Good

NOTE: This guide has moved to https://github.com/bpierre/switch-to-vim-for-good

This guide is coming from an email I used to send to newcomers to Vim. It is not intended to be a complete guide, it is about how I switched myself.

My decision to switch to Vim has been made a long time ago. Coming from TextMate 1, I wanted to learn an editor that is Open Source (so I don’t lose my time learning a tool that can be killed), cross platform (so I can use it everywhere), and powerful enough (so I won’t regret TextMate). For these reasons, Vim has always been the editor I wanted to learn, but it took me several years before I did it in a way that works for me. I tried to switch progressively, using the Janus Vim distribution for a few months, then got back to using TextMate 2 for a time, waiting for the next attempt… here is what finally worked for me.

Original gist with comments: https://gist.github.com/bpierre/0a0025d348b6001394e0

@romainl
romainl / _rnb.md
Last active August 12, 2021 21:56
RNB, a Vim colorscheme template
@mlr
mlr / rspec_rails_cheetsheet.rb
Last active October 26, 2023 14:32 — forked from them0nk/rspec_rails_cheetsheet.rb
Rspec Rails cheatsheet with expect syntax (including capybara matchers)
# Model
expect(@user).to have(1).error_on(:username) # checks whether there is an error in username
expect(@user.errors[:username]).to include("can't be blank") # check for the error message
# Rendering
expect(response).to render_template(:index)
# Redirecting
@tomas-stefano
tomas-stefano / Capybara.md
Last active April 10, 2024 15:27
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above
@pnathan
pnathan / clj-hash.lisp
Last active December 16, 2015 11:38
clj-hash: clojure's hashes kind of brought to common lisp
(defmacro clj-hash (&rest kvs)
"Destructures `kvs`: assums keys and values are paired together:
kvs ::= k1 v1 ... kn vn
Defines a sequence of functions ki that will obtain the value of ki
from a hash table.
Raises simple-error on ki not being a keyword.