Skip to content

Instantly share code, notes, and snippets.

View kmurph73's full-sized avatar

Kyle Murphy kmurph73

  • San Luis Obispo, CA
View GitHub Profile
@kmurph73
kmurph73 / spiral.rb
Last active December 31, 2017 19:34
whiteboard wednesday spiral solution
require 'byebug'
spiral_arr = [
[1,2,3,4],
[5,6,7],
[8,9,10,11],
[12,13,14]
]
@held_arr = nil
#!/usr/bin/env ruby
hosts = '/etc/hosts'
lines = []
blocked_sites_section = false
File.open(hosts, 'r') do |f|
while line = f.gets
@kmurph73
kmurph73 / plugs.vim
Last active March 19, 2023 17:42
vim-plug config
call plug#begin()
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rails'
Plug 'vim-ruby/vim-ruby'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'scrooloose/nerdtree'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
@kmurph73
kmurph73 / .vimrc
Last active December 9, 2023 23:05
my vimrc
set incsearch
set nocompatible " be iMproved, required
set ruler
syntax on
syntax enable
" turn off bell
set noerrorbells visualbell t_vb=
autocmd GUIEnter * set visualbell t_vb=
@kmurph73
kmurph73 / gist:1304647
Created October 21, 2011 19:02
Output from brew install graphicsmagick --use-gcc
==> Downloading http://downloads.sourceforge.net/project/graphicsmagick/graphicsmagick/1.3.12/GraphicsMagick-1.3.12.tar.bz2
File already downloaded in /Users/kmurph79/Library/Caches/Homebrew
/usr/bin/tar xf /Users/kmurph79/Library/Caches/Homebrew/graphicsmagick-1.3.12.tar.bz2
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/graphicsmagick/1.3.12 --enable-shared --disable-static --with-gs-font-dir=/usr/local/share/ghostscript/fonts
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/graphicsmagick/1.3.12 --enable-shared --disable-static --with-gs-font-dir=/usr/local/share/ghostscript/fonts
configuring GraphicsMagick 1.3.12
checking build system type... i386-apple-darwin11.2.0
checking host system type... i386-apple-darwin11.2.0
checking target system type... i386-apple-darwin11.2.0
require 'oauth_util.rb'
require 'net/http'
o = OauthUtil.new
o.consumer_key = 'examplek9SGJUTUpocjZ5QjBJmQ9WVdrOVVFNHdSR2x1TkhFbWNHbzlNQS0tJnM9Y29uc3VtkZXJzZWNyZXQmeD0yYg--';
o.consumer_secret = 'exampled88d4109c63e778dsadcdd5c1875814977';
url = 'http://query.yahooapis.com/v1/yql?q=select%20*%20from%20social.updates.search%20where%20query%3D%22search%20terms%22&diagnostics=true';
@kmurph73
kmurph73 / gist:780466
Created January 14, 2011 23:11
formula for homebrew tesseract attempt
require 'formula'
class TesseractEnglishData <Formula
url 'http://tesseract-ocr.googlecode.com/files/tesseract-2.00.eng.tar.gz'
md5 'b8291d6b3a63ce7879d688e845e341a9'
version '2.00'
end
class Tesseract <Formula
url 'http://tesseract-ocr.googlecode.com/files/tesseract-3.00.tar.gz'
The path `/home/deploy/Documents/Rails_Projects/deed/vendor/gems` does not exist.
-----
~/Documents/Rails_Projects is my local rails directory, for some reason it's putting my server's home path (/home/deploy/) in front of my local directoy, when checking for local gems
$ ruby -v
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]
$ rake db:migrate
Rails 3 doesn't officially support Ruby 1.9.1 since recent stable
releases have segfaulted the test suite. Please upgrade to Ruby 1.9.2
before Rails 3 is released!
You're running
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.4.0]