Skip to content

Instantly share code, notes, and snippets.

View chrisortman's full-sized avatar

Chris Ortman chrisortman

View GitHub Profile
@chrisortman
chrisortman / LoginForm.cs
Created February 27, 2014 16:34
Example of C# html builder
public class LoginForm : FormView
{
public LoginForm()
{
this.Action = "/login";
Method = "POST";
AutoComplete = "off";
Classes = new[] {"form-stacked"};
DefineFields<LoginModel>(f =>
rails new nebcc14 -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb

This will give me a little wizard where I can choose some default options. For simplicitly I'm going to omit some things like devise (used for user authentication)

In this example I will choose the first option for everything except

  • Build a starter application - 3 I want to build my own
  • Unit Testing? - 2 RSpec
  • Fixture replacement? - 2 - Factory Girl
@chrisortman
chrisortman / index.html
Created April 16, 2014 04:04
game of life
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Jasmine Spec Runner v2.0.0</title>
<link rel="shortcut icon" type="image/png" href="jasmine-standalone-2/lib/jasmine-2.0.0/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" href="jasmine-standalone-2/lib/jasmine-2.0.0/jasmine.css">
<script type="text/javascript" src="jasmine-standalone-2/lib/jasmine-2.0.0/jasmine.js"></script>
<script type="text/javascript" src="jasmine-standalone-2/lib/jasmine-2.0.0/jasmine-html.js"></script>
.slide-container {
overflow: hidden;
}
.slide.ng-enter,
.slide.ng-leave {
-webkit-transition: 300ms cubic-bezier(0.250, 0.250, 0.750, 0.750) all;
-moz-transition: 300ms cubic-bezier(0.250, 0.250, 0.750, 0.750) all;
-ms-transition: 300ms cubic-bezier(0.250, 0.250, 0.750, 0.750) all;
@chrisortman
chrisortman / packages.config
Created August 5, 2014 14:59
Failing test for SM3 property injection
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="structuremap" version="3.0.5.130" targetFramework="net45" />
<package id="xunit" version="1.9.2" targetFramework="net45" />
</packages>
@chrisortman
chrisortman / fix_finders.rb
Last active August 29, 2015 14:09
Converts finder methods to ActiveRecord 3
#!/usr/bin/env ruby -n
#
# You can setup shortcuts in vim that will run this automatically
#
# :map mm :.!~/<path_to_script>/fix_finders.rb<cr>
# Will replace the current line with the output of this script
#
# :map mn :t.<cr>:.!~/<path_to_script>/fix_finders.rb<cr>
# Will duplicate the line first so that you can do comparision of the
@chrisortman
chrisortman / fraction.rb
Created December 3, 2014 06:11
Fraction multiplication visualization
class Fraction
attr_accessor :numerator, :denominator
def initialize(n,d)
@numerator = n
@denominator = d
end
end
@chrisortman
chrisortman / open-hack-announce.md
Last active August 29, 2015 14:20
Open Hack Announce

You don't want to be that bitter guy in the corner who had the great idea 5 yrs ago but never executed it. -@jasonlankow

Finish those side projects on github. Learn that new language or framework. Contribute to open source. If you make small consistent progress you will get something done. You just need a dedicated time and space.

Come to the North Liberty CoLab on the second Thursday of every month. A productive environment with a group of peers for when you need that second set of eyeballs.

Hope to see you there,

Chris

public partial class Application {
public Func<Url> Blog_Url = get('/blogs/index', x => x.Class('BlogController').Action('ShowBlogs'))
}
public partial class Site {
public class Blogs {
public static Func<int,URL> Show = get(() => {
pa devlist
API CALL [pa(devlist)] output:
0;Built-in Microphone;2;0;i
1;Built-in Input;2;0;
2;Built-in Output;0;2;r,o