Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@tehviking
tehviking / test_name_finder.rb
Created September 15, 2015 15:40
Find failures & errors and their count in test output
class Parser
attr_reader :files
def initialize
@read_file_mode = false
@files = {}
end
def feed(line)
if scan_mode? && scan_match(line)
@read_file_mode = true
@tehviking
tehviking / prettify.scss
Created January 28, 2015 22:46
Tomorrow night theme
/* Tomorrow Night Eighties Theme */
/* Original theme - https://github.com/chriskempson/tomorrow-theme */
/* Pretty printing styles. Used with prettify.js. */
/* SPAN elements with the classes below are added by prettyprint. */
/* plain text */
/* line 7, /Users/bhays/Sites/new-website/source/stylesheets/lib/prettify.scss */
.pln {
color: #cccccc; }
@media screen {
@tehviking
tehviking / markeith.txt
Created September 25, 2014 23:07
Toby Markeith
ed, White and Roy
Singing her fist
And I like Gene and Roy
Singing her feet,
The U.S. of A.
'Cause we'll put a boot it reved up, rocking, ready to run
And someday soon, I'm gonna climb right down,
She gives them what thing.
Cast a big boss man, he lit up you'll always stand up in the stereo.
@tehviking
tehviking / fb_scrape.rb
Last active December 17, 2020 23:43 — forked from ashaw/fb_scrape.rb
Fork of fb_scrape to accommodate changes in Ruby 2, native JSON and CSV libs, and insert pictures and links of posts when applicable.
# gem install rest-client
require 'json'
require 'rest_client'
require 'csv'
require 'cgi'
require 'uri'
# To use, get an access token here, by clicking "get access token"
# and checking user.groups in the dialog box
# https://developers.facebook.com/tools/explorer?method=GET&path=209024949216061%2Ffeed
Name Description Due
A task The desscrption of the task dd/mm/yy
More tasks More descriptions of tasks dd/mm/yy
@tehviking
tehviking / go_optional_arg.rb
Last active December 16, 2015 04:48 — forked from jeremywrowe/gist:5373873
Extract into class & methods and add ability to enter argument to specify branch
#!/usr/bin/env ruby
class Go
attr_accessor :branch_input, :branch_list
def initialize
@branch_input = ARGV[0]
end
def initialize_branch_name(&block)
@branch_input ||= begin
@tehviking
tehviking / html_css_intro.md
Created February 10, 2013 06:34
Intro to HTML/CSS for Rails Girls ATX

HTML + CSS Intro

HTML is for markup. CSS is for styling.

Markup is the structure of your site. What goes where, and in what order. Text, images, etc.

Styling is the look of your site. What colors, fonts, effects, and design elements you'll use.

There's a lot to know!

@tehviking
tehviking / move_to_bootstrap.md
Last active December 12, 2015 08:59
Dropping in latest Bootstrap & Styling for RailsGirls

Now, let's make it pretty!

1: Clean out the old stuff

First, delete the file app/assets/stylesheets/scaffolds.css.scss

Then, in app/assets/stylesheets/application.css

Remove:

@tehviking
tehviking / pacman_kata.rb
Created May 10, 2012 02:36
Pacman Code Kata for Austin.rb with @timtyrell and @ceez
class GameBoard
attr_accessor :game_grid
def initialize
@game_grid = [%w[. . .], %w[. . .], %w[. . .]]
@pacman = Pacman.new
@pacman_location = [1,1]
end
def place_pacman
game_grid[@pacman_location[0]][@pacman_location[1]] = Pacman::STATES[@pacman.current_direction]