Skip to content

Instantly share code, notes, and snippets.

View dylanbeattie's full-sized avatar

Dylan Beattie dylanbeattie

View GitHub Profile
@dylanbeattie
dylanbeattie / basic_dim
Created November 30, 2010 20:48
How to make C# look like Basic, #1 - DIM statements
using System;
using System.Collections.Generic;
public class DIM {
private string contents;
private DIM(string contents) {
this.contents = contents;
}
public static implicit operator DIM(int x) {
{
"data": {
"type": "musician",
"id": "1234",
"attributes": { },
"relationships": {
"bands": {
"links": {
"self": "/musicians/1234/relationships/bands",
"related": "/musicians/1234/bands"
{ "data" : [
{
"type": "band",
"id": "56",
"attributes": { "name" : "The Funky Frog Band", "website" : "http://www.funky-frog-band.com" },
"links": { "self" : "/bands/56" },
"relationships": {
"members": {
"links" : {
"self": "/bands/56/relationships/members",
{ "data" : [
{
"type": "band",
"id": "56",
"attributes": { "name" : "The Funky Frog Band", "website" : "http://www.funky-frog-band.com" },
"links": { "self" : "/bands/56" },
"relationships": {
"members": {
"links" : {
"self": "/bands/56/relationships/members",
Old :
Session is about mutation testing, why and when you should mutate your code.
What benefits comes by mutating your code. Simply test your own tests.
It's very helpful tool with TDD where you are exposed to a lot of wrong
assumptions and simple syntactic errors that can propagate other errors.
New :
You write your unit tests to guard your code, but who will guard your unit tests ?
We put a lot of trust into our unit tests, but should we really ? We are humans, and we make mistakes.
SET TLD=%COMPUTERNAME%
(
echo [req]
echo default_bits = 2048
echo prompt = no
echo default_md = sha256
echo x509_extensions = v3_req
echo distinguished_name = dn
echo:
@dylanbeattie
dylanbeattie / pivotal_markdown.js
Last active March 22, 2019 18:53
Javascript bookmarklet that will copy the selected stories in Pivotal Tracker to your clipboard as bullet points with Markdown hyperlinks
/*
This bookmarklet will let you select multiple stories in Pivotal Tracker and then
copy story details to your clipboard in Markdown format, as:
* Story name [#123456579](https://www.pivotaltracker.com/story/show/123456789)
* Story name [#123456579](https://www.pivotaltracker.com/story/show/123456789)
You can then paste this into your GitHub pull request description, then paste the resulting
rendered HTML into release emails, Slack, etc.
BEGIN:VCARD
VERSION:2.1
N:Gump;Forrest;;Mr.
FN:Forrest Gump
ORG:Bubba Gump Shrimp Co.
TITLE:Shrimp Man
PHOTO;GIF:http://www.example.com/dir_photos/my_photo.gif
TEL;WORK;VOICE:(111) 555-1212
TEL;HOME;VOICE:(404) 555-1212
ADR;WORK;PREF:;;100 Waters Edge;Baytown;LA;30314;United States of America
#parse parameters supplied by TeamCity script step
param (
[string]$branch = "refs/heads/master",
[string]$branch_is_default = "true",
[string]$build_number = "0"
)
function Update-AssemblyVersion {
param ([string]$version)
CREATE TABLE RockClub (
ID INT IDENTITY(1, 1),
Address_NS NVARCHAR(128) COLLATE SQL_Latin1_General_CP1_CI_AI,
Address_VS VARCHAR(128) COLLATE SQL_Latin1_General_CP1_CI_AI,
Address_NW NVARCHAR(128) COLLATE Latin1_General_CI_AI,
Address_VW VARCHAR(128) COLLATE Latin1_General_CI_AI
)
INSERT INTO RockClub (Address_NS, Address_VS, Address_NW, Address_VW) VALUES (N'Saarbrücker Straße 24, 10405 Berlin','Saarbrücker Straße 24, 10405 Berlin',N'Saarbrücker Straße 24, 10405 Berlin','Saarbrücker Straße 24, 10405 Berlin')