Skip to content

Instantly share code, notes, and snippets.

View kevinold's full-sized avatar

Kevin Old kevinold

View GitHub Profile
@kevinold
kevinold / feeds.opml
Last active August 29, 2015 14:06 — forked from bevacqua/feeds.opml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.1">
<!--Generated by NewsBlur - www.newsblur.com-->
<head>
<title>NewsBlur Feeds</title>
<dateCreated>2013-07-12 03:43:24.605173</dateCreated>
<dateModified>2013-07-12 03:43:24.605173</dateModified>
</head>
<body>
<outline text="Tech News" title="Tech News">
#!/usr/bin/env ruby
require 'httparty'
require 'hipchat'
require 'yaml'
LAST_MESSAGE_FILE = 'tmp/last_github_status.yml'
HIPCHAT_API_KEY = 'secret'
HIPCHAT_ROOM = 'Notifications'
.btn-primary {
background-color: #08c;
border-color: #08c;
color: #fff;
background-color: #007ab8;
background-image: -moz-linear-gradient(top, #08c, #006699);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#08c), to(#006699));
background-image: -webkit-linear-gradient(top, #08c, #006699);
background-image: -o-linear-gradient(top, #08c, #006699);
background-image: linear-gradient(to bottom, #08c, #006699);
---
:sources:
- http://gems.rubyforge.org
- http://gems.github.com
gem: --no-ri --no-rdoc
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:

ruby-1.9.3-p448 cumulative performance patch for rbenv

(I guarantee nothing. No warranty I am not responsible blah blah blah. Seems to work great for me so far. Thanks to Tyler Bird who I forked this from.)

This installs a patched ruby 1.9.3-p448 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets

Requirements

# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
ko.extenders.persist = function (target, option) {
target.subscribe(function (newValue) {
window.localStorage.setItem(option, newValue);
});
return target;
};
//and use it like this:
var item = ko.observable().extend({persist:"storedItem"});
public override void RegisterArea(AreaRegistrationContext context)
{
context.MapRoute("RestfulControllers", "api/{controller}", new
{
controller = "Home",
action = RestfulActionAttribute.RestfulActionName,
id = UrlParameter.Optional
});
context.MapRoute("RestfulControllers_Id", "api/{controller}/{id}", new