Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Joe Martinez capitalist

🎯
Focusing
Block or report user

Report or block capitalist

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@capitalist
capitalist / julia-env.sh
Last active May 13, 2017 — forked from moisespsena/julia-env.sh
Install Latest Julia Stable enviroment on Debian
View julia-env.sh
#!/bin/bash
SD=$(dirname $(realpath "$0")) || exit 1
[ `arch` = 'x86_64' ] && url='https://julialang.s3.amazonaws.com/bin/linux/x64/0.5/julia-0.5.2-linux-x86_64.tar.gz' \
|| url='https://julialang.s3.amazonaws.com/bin/linux/x86/0.5/julia-0.5.2-linux-i686.tar.gz'
echo $url
tmpd="$SD/tmp"
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 FunkyInheritance.rb
#!/usr/bin/env ruby
def Inherits(*classes)
klass = Class.new 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 Module.new { include refine(refine_with) { } }
end
klass
end
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
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 = Module.new
exhibitionist.send(:define_method, name, &block)
view.extend exhibitionist
end
# 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:#{current_user.id}"
if value = $cache.get(cache_key)
value
else
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
wget http://downloads.sourceforge.net/project/rubycocoa/RubyCocoa/1.0.1/RubyCocoa-1.0.1.tar.gz?use_mirror=superb-sea2
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.