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 / book.rb
Created Aug 14, 2018 — forked from sirupsen/book.rb
Script to import books from Instapaper to Airtable
View book.rb
class Book < Airrecord::Table
class Endorser < Airrecord::Table
self.base_key = ""
self.table_name = "Endorser"
end
self.base_key = ""
self.table_name = "Books"
has_many :endorsements, class: 'Book::Endorser', column: 'Endorsements'
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 / 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
@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 / setup-ubuntu.sh
Last active Dec 25, 2015
Rails setup for Rails production server using Nginx, Git, Postgresql, and the speedy Recap capistrano gem.
View setup-ubuntu.sh
#!/bin/sh
sudo apt-get -y update
sudo add-apt-repository ppa:nginx/stable
sudo apt-get -y update
sudo apt-get install -y git-core postgresql-9.1 mysql-server libpq-dev \
curl build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
@mdespuits
mdespuits / install-erlang.sh
Last active Dec 20, 2015
Install Erlang on Mac OS X
View install-erlang.sh
#!/bin/sh
#
# Script built from the reference at
# http://digitalsanctum.com/2009/10/01/installing-erlang-on-mac-os-x/
sudo -v
wget http://www.erlang.org/download/otp_src_R16B01.tar.gz
tar -xzf otp_src_R16B01.tar.gz
@mdespuits
mdespuits / performance.rb
Created Apr 3, 2013
Array concatenation benchmarks
View performance.rb
require 'benchmark'
ITERATIONS = 10_000
Benchmark.bm do |bm|
bm.report("#<< -> #flatten!: ") do
array = [1,2,3]
ITERATIONS.times do
array << [4,5,6]
array.flatten!
@mdespuits
mdespuits / fib.rs
Last active Dec 15, 2015
My first Rust program
View fib.rs
// My first Rust program
// Simply outputs fibbonaci numbers from 20 to 0
use core::task::spawn;
fn fib(number: int) -> int {
if number > 1 {
return fib(number - 1) + fib(number - 2);
} else {
return number;
@mdespuits
mdespuits / dynamic_logger_progname.rb
Last active Dec 15, 2015
Singleton Logger wrapper including a progname
View dynamic_logger_progname.rb
require_relative './example_logger'
class ExampleClass
def initialize
ExampleLogger.info("Initializing ExampleClass")
end
end
ExampleClass.new
@mdespuits
mdespuits / update_repos.rb
Last active Dec 14, 2015
Update all git repositories in a given directory
View update_repos.rb
#!/usr/bin/env ruby
require 'optparse'
require 'ostruct'
require 'pathname'
class Text
attr_reader :string
You can’t perform that action at this time.