Skip to content

Instantly share code, notes, and snippets.

View adamzaninovich's full-sized avatar

Adam Zaninovich adamzaninovich

View GitHub Profile
@darioghilardi
darioghilardi / config.el
Created February 19, 2020 13:00
Doom-Emacs Elixir config
;; Elixir configuration
;; Start by configuring Alchemist for some tasks.
(def-package! alchemist
:hook (elixir-mode . alchemist-mode)
:config
(set-lookup-handlers! 'elixir-mode
:definition #'alchemist-goto-definition-at-point
:documentation #'alchemist-help-search-at-point)
(set-eval-handler! 'elixir-mode #'alchemist-eval-region)
(set-repl-handler! 'elixir-mode #'alchemist-iex-project-run)
@remcoder
remcoder / game of life with 8x8 bicolor led matrix
Last active September 23, 2016 12:02
I recently got one of those 8x8 LED matrices and I was playing with some Game of Life patterns when I found this pretty repeating pattern. I found it by starting with some random patterns. If you look closely you can see the pattern becoming a mirrored version of itself halfway through. Apparently the pattern doesn't repeat like this on an infin…
/*
I recently got one of those 8x8 LED matrices and I was playing with some Game of Life patterns when I found this pretty repeating pattern. I found it by starting with some random patterns. If you look closely you can see the pattern becoming a mirrored version of itself halfway through. Apparently the pattern doesn't repeat like this on an infinite grid but on this wrapping 8x8 grid it does ;-)
FYI, the LED matrix is a bicolor one (green/red) and has an I2C interface (http://www.adafruit.com/products/902). I'm using the colors as follows:
- newly created cells are green
- cells that are at least 10 generations old are red
- other living cells are yellow (simultaneously green+red)
It's hookup up to my Arduino Uno r3.
@mattsears
mattsears / README.md
Created September 5, 2011 07:41
Gittr: A Git key/value store

Gittr.rb

Git as a key-value store! Build with Grit, it supports SET, GET, KEYS, and DELETE operations. In addition, we can also get the change history of key/values.

And since it's Git, we can easily enhance it to include other awesome Git features such as branches, diffs, reverting, and more!

Example:

@victusfate
victusfate / Gemfile
Created May 10, 2011 00:06 — forked from dodeja/Gemfile
Rails 3.1 Beta 1 on Heroku Working Config
# source 'http://rubygems.org'
source :gemcutter
gem 'rails', '3.1.0.beta1'
# Asset template engines
gem 'json'
gem 'sass'
gem 'coffee-script'
gem 'uglifier'
@fabioyamate
fabioyamate / nokogiri
Created June 18, 2010 02:56
nokogiri installation from libxml2 and libxslt macosx
# using rvm with ruby-1.8.7-p249
# latest version 2.7.7 2010-06-17
brew install libxml2
# installing libxslt from source code
wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz
./configure --prefix=/usr/local/Cellar/libxslt/1.1.26 --with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.7
make
sudo make install
When /^(.*) in the "([^\"]*)" section$/ do |action, title|
within "//*[(h1|h2|h3|h4|h5|h6|legend|caption)/descendant-or-self::*[contains(text(), '#{title}')]]" do
When action
end
end
When /^(.*) in the "([^\"]*)" row$/ do |action, title|
within "//*[(th|td)/descendant-or-self::*[contains(text(), '#{title}')]]" do
When action
end
#!/usr/bin/env ruby
require 'rubygems'
gem 'rack', '=0.9.1'
gem 'thin', '=1.0.0'
require 'sinatra'
get '/' do
content_type 'text/plain'
"Hello, world"
end