Skip to content

Instantly share code, notes, and snippets.

View Sheeo's full-sized avatar

Michael Søndergaard Sheeo

View GitHub Profile
@Sheeo
Sheeo / gist:1261718
Created October 4, 2011 14:02
ddb generation
Pruning tables.
Executing: DELETE FROM Branches;
Nil result
Executing: DELETE FROM Accounts;
Nil result
Executing: DELETE FROM Customers;
Nil result
Executing: DELETE FROM Transactions;
Nil result
Inserting branch
@Sheeo
Sheeo / gist:1104920
Created July 25, 2011 19:14
Not the way to add rows to a table
Public Shared Function GenerateNewUniqueID() As String
Dim returnString As String = Guid.NewGuid.ToString()
Dim unique As Boolean = False
Using conn As New SqlConnection(My.Settings.onlinePDFConnectionString)
conn.Open()
Dim commString As String = "SELECT Count(*) FROM Books WHERE UniqueID = '{0}%'"
<% content_for :nav do %>
<ul>
<%
items = ["Forside", "Rediger quiz", "Kategorier", "Spilrunder"]
descriptions = ["Gå til forsiden", "Rediger en quiz", "Opsæt kategorier", "Vælg spilrunder"]
items.each_index do |key|
item = items[key]
item_description = descriptions[key]
if !is_active_page?(:key)
@Sheeo
Sheeo / gist:732149
Created December 7, 2010 18:01
Awesomeness
# Ruby-RSpec klasse brugt til at beskrive MultiSet-java klassen med
#
# For at køre:
# make spec
#
# Kræver:
# jruby (http://jruby.org)
# rspec (gem install rspec)
#