Skip to content

Instantly share code, notes, and snippets.

@tgsoverly
tgsoverly / readme.md
Last active December 17, 2015 05:29
EmberJS nested routes, resources and templates when you use separate files with the rails-gem

The Issue

You are using the rails gem and you have a Router:

App.Router.map ->
  @resource "things", ()->
    @resource("thing", path: ":thing_id", ()->
      @route "create"
@tgsoverly
tgsoverly / link-tracker-to-zen.sh
Last active August 29, 2015 14:03
Script to Link Pivotal Tracker Stories to Zendesk Tickets after both have been created.
@tgsoverly
tgsoverly / LogWrapper.groovy
Created June 26, 2014 20:09
A script to find a lines in files that contains a regex, and allow you to surround that line with something else.
import java.nio.file.DirectoryStream
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.Paths
class LogWrapper {
static exclusions = ["/deployments/", "grails-app/conf/", "/test/", "/cas/", "/migrations/", "/target/"]
@tgsoverly
tgsoverly / LogPerformanceSpec.groovy
Last active August 29, 2015 14:03
A test to check about logging performance
package com.spidasoftware.interchange.util
import groovy.util.logging.Log4j
import org.apache.log4j.Logger
import spock.lang.Specification
/**
* Created by toverly on 6/27/14.
*/
class LogPerformanceSpec extends Specification {
@tgsoverly
tgsoverly / GSP snippet of wrongness.html
Last active August 29, 2015 14:04
Never before have some many languages done so little
<tbody>
<tr>
<td style="text-align:right" colspan="2">
<g:javascript>
var types = new Array();
<g:each var="code" status="i" in="${ProjectCodeType.values()}">
types[${i}] = "${code.toString()}";
</g:each>
var adder${projectInstance.id} = new ProjectCodeAdder("project${projectInstance.id}",types);
adder${projectInstance.id}.id = ${newProjectCodeCounter};
@tgsoverly
tgsoverly / merge-xml-coverage.py
Created May 8, 2015 13:12
Merge Cobertura XML's
import sys
import os
import xml.etree.ElementTree as ET
import logging
import re
from shutil import copyfile
from optparse import OptionParser
### This file came from the https://github.com/flow123d/flow123d repo they were nice enough to spend time to write this.
### It is copied here for other people to use on its own.
@tgsoverly
tgsoverly / list of humiliating bugs.md
Last active August 29, 2015 14:24
Highest Time/Character Ratio for Bugs

Times in "Hours per Character"

  1. 0.84210526315 - 16 hours/"open_in_view: false" - I spent trying to get a spring boot to not open a connection to the database.
  2. infinity - 20 hours/"" - Time I spend debugging a "Timeout Exception" only to have it be a computer issue with networking that went away once I restart the computer.
  3. 10.0 - 10 hours/"5" - Michael, Jeremy and Andrew spend time upgrading a version that fixed a connection closing in MongoDB.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::,:::::::,:::::::::,:::::::::,:::,::,,:,,,:::::,:::,,,,,,,,,,,,,,,,,,,,,,,,
::::::::::::::::::::::::::::::::::::::::::::::::,:::,::::::::::::::::::,::::,::::::,:::,::,:,,:,,,,,,,,,,,,:,:,,,,,,,,,,,,,,,,,,,,,,,,,,
:::::::::::::::::::::::::::::::::::::::::,:::::::::,:::::::::,:::,:::,,,,:,,,,,,::,,:,,,:,,:::,,:,:,,,,,,,:::,,,,,,,,,,,,,,,,,,,,,,,,,,,
:::::::::::::::::::::::::::::::::::::::::,:,::,,,,:::::::::::::::,,,,,,,,,,,:,,,:,,::,,,,,,,,::,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
::::::::::::::::::::::::::::::::,:,:::::::::,,::::::,,:::,,,,:,,:,,,,:,,,::::::,,,,,,,,,,,,,::,,,,,,,,,,,,,,,,,,,,,,,,,:,,,,,,,,,,,,,,,,
:::::::::::::::::::::::::::,,::::::,:::::::,,,:,::,,,,,:,,,,,,,:::,:::,,:,,:::,,,,,,,:,,,,:,,,,,,,:,,:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
::::::::::::::::::::::::::::,:,,,,::,::::,:::,::,:,:,,,,,::,,,:,,,,,,:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
:::::::::::::::::::::::,:::
[
{"ab_test":{"achievements":"on","anonymous_driving":"off"}}
]
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
describe "GET #index" do
#describe "POST #create" do
#describe "GET #show" do
#describe "PATCH #update" do (or PUT #update)
#describe "DELETE #destroy" do
#describe "GET #new" do