Skip to content

Instantly share code, notes, and snippets.

@jlongster
jlongster / immutable-libraries.md
Last active September 11, 2021 08:32
List of immutable libraries

A lot of people mentioned other immutable JS libraries after reading my post. I thought it would be good to make a list of available ones.

There are two types of immutable libraries: simple helpers for copying JavaScript objects, and actual persistent data structure implementations. My post generally analyzed the tradeoffs between both kinds of libraries and everything applies to the below libraries in either category.

Libraries are sorted by github popularity.

Persistent Data Structures w/structural sharing

class Ticket < ActiveRecord::Base
belongs_to :grouper
belongs_to :user
validate :user_cant_be_blacklisted, on: :confirmation
validate :user_cant_double_book, on: :confirmation
validate :grouper_cant_be_full, on: :confirmation
validate :grouper_cant_have_occurred, on: :confirmation
@tonyseek
tonyseek / Makefile
Last active August 29, 2015 13:57
Patch the Monaco font for vim-powerline/vim-airline in OS X.
PATCHED_FILENAME = "Monaco for Powerline.ttf"
$(PATCHED_FILENAME): Monaco.ttf fontpatcher.py fontpatcher-symbols.sfd
fontforge -script fontpatcher.py Monaco.ttf
@echo "(´・_・`) You can install the $(PATCHED_FILENAME) now."
Monaco.ttf: Monaco.dfont
fondu Monaco.dfont
rm *.bdf
@SabretWoW
SabretWoW / rspec_model_testing_template.rb
Last active March 7, 2024 03:56
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2024 06:36
A badass list of frontend development resources I collected over time.
@martintrojer
martintrojer / aleph-async.clj
Created January 28, 2012 16:41
async-clojure
(async
(for [i (range 10 80)]
(http-request
{:method :get
:url (format "http://fssnip.net/%d" i)}))))