Skip to content

Instantly share code, notes, and snippets.

Matthew Wells mdespuits

Block or report user

Report or block mdespuits

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
@mdespuits
mdespuits / cap-description.md
Last active Aug 29, 2015
Some assets not being precompiles
View cap-description.md

Development

Rails Version: 4.1.0.rc2

As you can see, in the tree there is are numerous files under the app/assets/images/icons directory. None of them are being precompiled.

Here is the ERb.

<div class="page_title">
@mdespuits
mdespuits / insertion-sort.rb
Last active Aug 29, 2015
Sort Algorithms Implemented in Ruby
View insertion-sort.rb
require 'minitest'
require 'minitest/autorun'
require 'benchmark/ips'
def sort(list)
new_list = list.dup
idx = 0
while idx < list.size
i = idx + 1
View keybase.md

Keybase proof

I hereby claim:

  • I am mattdbridges on github.
  • I am mattdbridges (https://keybase.io/mattdbridges) on keybase.
  • I have a public key whose fingerprint is 93E8 46F1 E119 A958 65B5 7112 7708 C2E9 6DF2 F05F

To claim this, I am signing this object:

@mdespuits
mdespuits / handlebars-1.0.0.beta.6.js
Created Apr 20, 2012
mattdbridges favorite javascript resources
View handlebars-1.0.0.beta.6.js
// lib/handlebars/base.js
var Handlebars = {};
Handlebars.VERSION = "1.0.beta.6";
Handlebars.helpers = {};
Handlebars.partials = {};
Handlebars.registerHelper = function(name, fn, inverse) {
if(inverse) { fn.not = inverse; }
@mdespuits
mdespuits / gist:2492087
Created Apr 25, 2012 — forked from thommahoney/gist:2491946
RailsConf 2012 Lightning Talks
View gist:2492087
1 min:
~Painless Javascript
koting hatduklgg
with wind tunnel
~tenderlove.dup jremsikjr
~iwanttolearnruby.com
(collecting resources for learning ruby)
@mdespuits
mdespuits / basic_postgres_setup.sh
Created May 15, 2012
mac os x postgres install (homebrew option)
View basic_postgres_setup.sh
# Access tty to ask for confirmation even if we're in a pipe (thanks Pow)
TTY="/dev/$( ps -p$$ -o tty | tail -1 | awk '{print$1}' )"
read -p "*** Do you want to reinstall the 'pg' gem [y/n]?" REINSTALL_PG < $TTY
if [[ $REINSTALL_PG == "y" ]]; then
gem uninstall pg
gem install pg
fi
# Ask if the user wants to setup the db with a 'root' superuser?
@mdespuits
mdespuits / chef-solo-ubuntu-12-04
Created Jun 29, 2012
Chef Solo Setup for Ubuntu 12.04
View chef-solo-ubuntu-12-04
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
tar -xvzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194/
./configure --prefix=/usr/local
make
make install
@mdespuits
mdespuits / brew-config
Created Aug 3, 2012
Node.js installation issues
View brew-config
HOMEBREW_VERSION: 0.9.2
HEAD: 3113434e7107c928dcfd411160bf44b921dd564d
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.7.4-x86_64
Xcode: 4.4
CLT: 1.0.0.9000000000.1.1249367152
GCC-4.0: N/A
GCC-4.2: build 5666
@mdespuits
mdespuits / backtrace.txt
Created Aug 15, 2012
Cancan block ability error in v1.6.8
View backtrace.txt
activerecord (3.2.6) lib/active_record/sanitization.rb:121:in `sanitize_sql_array'
activerecord (3.2.6) lib/active_record/sanitization.rb:28:in `sanitize_sql_for_conditions'
activerecord (3.2.6) lib/active_record/relation/query_methods.rb:324:in `build_where'
activerecord (3.2.6) lib/active_record/relation/query_methods.rb:136:in `where'
activerecord (3.2.6) lib/active_record/querying.rb:9:in `where'
cancan (1.6.8) lib/cancan/model_adapters/active_record_adapter.rb:96:in `database_records'
cancan (1.6.8) lib/cancan/model_additions.rb:23:in `accessible_by'
activerecord (3.2.6) lib/active_record/relation/delegation.rb:37:in `block in method_missing'
activerecord (3.2.6) lib/active_record/relation.rb:241:in `block in scoping'
activerecord (3.2.6) lib/active_record/scoping.rb:98:in `with_scope'
@mdespuits
mdespuits / sublime_shortcuts.md
Last active Oct 9, 2015 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts
View sublime_shortcuts.md

Sublime Text 2 - Useful Shortcuts (Mac OS X)

General

Command Action
⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
You can’t perform that action at this time.