Skip to content

Instantly share code, notes, and snippets.

View barnes7td's full-sized avatar

Timothy Barnes barnes7td

  • CleanSlate
  • Indianapolis, IN
View GitHub Profile
Shoes.app do
stack do
@console = edit_box
@input = edit_line
@button = button "Ask Name"
end
$stdout = StringIO.new
$stdin = StringIO.new
@barnes7td
barnes7td / sublime_setup.md
Last active March 28, 2024 17:59
Sublime Terminal Setup

Setup Terminal for Sublime Shorcut "subl":

Open terminal and type:

1. Create a directory at ~/bin:

mkdir ~/bin

2. Copy sublime executable to your ~/bin directory:

@barnes7td
barnes7td / sublime_plugins.md
Created October 5, 2012 02:07
Sublime Plugins for Ruby and Rails

Sublime Plugins for Ruby and Rails

General

I would start by installing the Sublime Package Control manager. This tool will allow you to install the other plugins without having to clone git repositories and copying them to the correct folders. Instead you will the command drop-down menu with "Ctrl + Shift + P" and then scrolling down until you see "Package Control: Install Package". A search bar will pop up and you can type the name of a package, click on the name and it will self install. If you have problems setting any of these up email me at barnes7td@gmail.com

Packages/Plugins

  1. Sublime Package Control - Install this first. This tool will allow you to easily install most (if not all) the other plugins in this list. (Ctrl + Shift + P, then select Package Control: Install Package)

  2. SublimeERB - This plugin auto creates the erb tags. (<% %>, <%= %>, etc.) (Ctrl +

@barnes7td
barnes7td / timothy_resume.md
Last active October 12, 2015 18:38
My resume
@barnes7td
barnes7td / windows_setup.md
Last active December 14, 2015 09:09
Windows Setup Overview

Windows Setup for Rails Development

Overview

Ruby

Gems

  • pik - ruby version control for windows

Customization Files

@barnes7td
barnes7td / diamond.rb
Last active December 15, 2015 17:09
Ruby challenge - diamond method
## Method 1 (used 2 methods)
def diamond(max_width)
string = ""
if max_width < 3
puts "*" if max_width == 1
puts "**" if max_width == 2
return nil
end
@barnes7td
barnes7td / sublime_tip_1.md
Last active December 16, 2015 05:29
First post for Bloc Sublime's shortcuts

Sublime Tip #1

This is the start of a series of posts to help you better utilize your most important tool in developing, your text editor. For this course we are recommending that you start out with Sublime Text 2. If you have chosen a different editor, read the shortcuts below and find the equivalent actions in your chosen editor. As usual, ask your mentor if you have questions or would like these demonstrated.

The goal of learning these shortcuts is to keep your hands on the keyboard as much as possible and to keep your hands in the same position on the keyboard. Using your mouse moves your hands from the keyboard and can slow your coding.


Autocomplete

@barnes7td
barnes7td / console.xml
Last active December 16, 2015 07:19
Console2 configuration xml fill, start configuration
<?xml version="1.0"?>
<settings>
<console change_refresh="10" refresh="100" rows="25" columns="80" buffer_rows="500" buffer_columns="0" shell="C:\Windows\System32\cmd.exe /c &quot;&quot;C:\RailsInstaller\Git\bin\sh.exe&quot; --login -i&quot;" init_dir="C:\Users\tbarnes\code" start_hidden="0" save_size="0">
<colors>
<color id="0" r="0" g="0" b="0"/>
<color id="1" r="0" g="0" b="128"/>
<color id="2" r="0" g="150" b="0"/>
<color id="3" r="0" g="150" b="150"/>
<color id="4" r="170" g="25" b="25"/>
<color id="5" r="128" g="0" b="128"/>
@barnes7td
barnes7td / fake_person.rb
Last active December 16, 2015 08:28
Ruby challenge for the "faker" gem
require 'faker'
class Person
include Faker
attr_reader :first_name, :last_name, :phone_number, :work_address, :bio, :email
def initialize
@first_name = Name.first_name
@last_name = Name.last_name
@barnes7td
barnes7td / sublime_tip_2.md
Last active December 16, 2015 12:28
The 2nd Sublime tip for Bloc

Sublime Tip #2

This tip we are going to discuss some Sublime setup and one shortcut. Feel free to ask sublime questions at the next google hangout.


Setting up Sublime for the command line

It is useful to open up Sublime from the command line. Typically, this is done by setting up the command subl to open up Sublime.
Once setup, the command subl . will open up the current directory. the command subl program.rb will open up the program.rb file. Here is how you set it up: