Skip to content

Instantly share code, notes, and snippets.


Joe Martinez capitalist

View GitHub Profile
capitalist / heroicons_with_surface.ex
Created Oct 17, 2020 — forked from lnr0626/heroicons_with_surface.ex
A module for handling svg icons both with and without surface
View heroicons_with_surface.ex
defmodule HeroiconWithSurface do
@moduledoc """
This assumes has been cloned as a submodule to svgs/heroicons
<#HeroiconWithSurface variant="outline" icon="phone" class="w-5 h-5" />
<%= HeroiconWithSurface.svg({"outline", "phone"}, class: "w-5 h-5") %>
use SvgIcons,
View FunkyInheritance.rb
#!/usr/bin/env ruby
def Inherits(*classes)
klass = classes.shift # inherit from the last clas
while refine_with = classes.shift # include the others as module refinements just so we can turn them into modules
klass.include { include refine(refine_with) { } }
capitalist /
Last active May 13, 2017 — forked from moisespsena/
Install Latest Julia Stable enviroment on Debian
SD=$(dirname $(realpath "$0")) || exit 1
[ `arch` = 'x86_64' ] && url='' \
|| url=''
echo $url
View rotate text in emacs.el
(defvar rotate-text-rotations
("true" "false")
("def" "defp")
("if" "else" "unless")
("yes" "no"))
"List of text rotation sets.")
(defun rotate-region (beg end)
"Rotate all matches in `rotate-text-rotations' between point and mark."
View gist:1259854
(function(a){a.fn.wresize=function(b){function c(){if(a.browser.msie)if(!wresize.fired)wresize.fired=!0;else{var b=parseInt(a.browser.version,10);wresize.fired=!1;if(b<7)return!1;if(b==7){var c=a(window).width();if(c!=wresize.width)return wresize.width=c,!1}}return!0}function d(a){if(c())return b.apply(this,[a])}return version="1.1",wresize={fired:!1,width:0},this.each(function(){this==window?a(this).resize(d):a(this).resize(b)}),this}})(jQuery)
View rocco.css
/*--------------------- Layout and Typography ----------------------------*/
body {
font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif;
font-size: 15px;
line-height: 22px;
color: #252519;
margin: 0; padding: 0;
a {
color: #261a3b;
View gist:799073
Mustache.to_javascript("Hello {{planet}}")
capitalist / this_works.rb
Created Dec 22, 2010
View specs for controllers that use decent_exposure
View this_works.rb
#in my spec helper
def expose(name, &block)
exhibitionist =
exhibitionist.send(:define_method, name, &block)
view.extend exhibitionist
# in my view spec
describe "dashboard/index.html.haml" do
it 'renders' do
View gist:405573
class MyView < Mustache
def cache_by_user_id
lambda do |text|
cache_key = "user:#{}"
if value = $cache.get(cache_key)
rendered = render(text)
$cache.set(cache_key, rendered)
View gist:404539
rvm install 1.8.7 --debug -C --with-readline-dir=$HOME/.rvm/usr,--with-iconv-dir=$HOME/.rvm/usr,--enable-shared
rvm 1.8.7
tar zxf RubyCocoa-1.0.1.tar.gz
cd RubyCocoa-1.0.1
ruby install.rb config --target-archs=x86_64
ruby install.rb setup
rvmsudo ruby install.rb install
gem install xrefresh-server
You can’t perform that action at this time.