Skip to content

Instantly share code, notes, and snippets.

View edavis10's full-sized avatar

Eric Davis edavis10

View GitHub Profile
edavis10 / chiliproject_to_redmine.rb
Created June 27, 2017 22:18 — forked from pille/chiliproject_to_redmine.rb
Run this script from the root of your Redmine installation to convert from a Chiliproject installation
# encoding: UTF-8
# Chiliproject to Redmine converter
# =================================
# This script takes an existing Chiliproject database and
# converts it to be compatible with Redmine (>= v2.3). The
# database is converted in such a way that it can be run multiple
# times against a production Chiliproject install without
# interfering with it's operation. This is done by duplicating
edavis10 / init.el
Created July 25, 2013 21:53
Link markdown documents in emacs using markdown-mode.
(add-hook 'markdown-mode-hook
(lambda ()
;; Open org-mode style links, [[]]
(local-set-key (kbd "C-c C-o") 'org-open-at-point-global)))

My latest stop in software to try and run my business has been Trello. Unlike Daylite ([read my Daylite review][dayrev]), Trello is not a specifically tailored CRM and Project management application.

Trello takes a much more open approach to dealing with managing business tasks. You can't specifically enter clients and then link emails, documents to them. At least not in a way similar to Daylite. You can make a card for a client, throw in their contact information, and then move that through your sales process.

@todo shot of client card in sales process

I know that someone is going to dig up my post about [no business models][nobus] and ask me why I'd even try a business crucial application that has no current business model. Well it's because Fog Creek is behind the software. Fog Creek has [gone on record][fogrecord] that they do plan on charging something at some point, but what you are using now will always be free. Fog Creek is a very reputable software company with many other sources of revenue. I'm w

class MyApp < Rails::Application
routes.append do
match "*", to: "controller#action"
class FooController < ApplicationController
# Each "------ N" is a step of refactoring. I start with 0 and go as far as I need to
# depending on the code smell. Each step makes the code easier to reuse outside the view,
# controller, etc.
# ------ 0. Code smell, ivar
def some_action
@calculated_data = Something.funky.that('isnt').abstracted('in a lower level')
edavis10 / article.rb
Created August 27, 2012 17:01 — forked from Achillefs/article.rb
Sample Article class posting to a Wordpress blog via wp-json-api
require 'rubygems'
require 'open-uri'
require 'json'
require 'net/http'
# Please note that the vanilla wp-json-api plugin does not support user authentication for create_post.
# Check out my fork for authentication support:
class Article
API_URI = ''
API_USER = 'my_wp_username'
# I think we can agree that this code is best, even if contrived:
if @article.public?
views += 1
redirect_to "/some/other/page"
# But sometimes, people don't make query methods that are positive, ie
edavis10 / post-checkout
Created November 14, 2011 21:07
Rebuild emacs TAGS on git checkout
#!/usr/bin/env ruby
# put in .git/hooks/post-checkout
# Ruby + JavaScript files - tmp files
files = (Dir['**/**.rb'] + Dir['**/**.js']).
delete_if {|f| f.match(/tmp\//) }.
delete_if {|f| f.match(/vendor\/local/) }
system("ctags -f TAGS -e --languages=-all,+ruby,+javascript #{files.join(' ')}")
edavis10 / git.txt
Created November 12, 2011 20:55
ChiliProject finn design interactive rebase log to squash and reorganize commits
# Project navigation but is code changes. Needs code review.
pick 2ce7570 [#692] project navigation - issues/summary closing | click field to large
s c7be3bf [#692] working project navigation
pick e385a88 [#692] change project navigation arrow on hover
s bc86e95 [#692] fix project navigation arrows
# Login menu
pick c5955a3 [#692] login slidedown implemented placeholder not compatible with IE & Co
s 083d31e [#692] login menu now compatible with IE 7/8/9, safari, chrome
s a28989a [#692] complete login pulldown tested on IE 7 / 8 / 9 / Firefox / Safari / Chrome
edavis10 / screenshot-web.rb
Created September 6, 2011 22:30
Take a full page screenshot of a website.
#!/usr/bin/env ruby
require 'rubygems'
require 'trollop'
require 'vapir'
def filename_for_url(url)
gsub(/\//, '_').