This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ssh into container | |
docker exec -t -i mycontainer-id /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add to (fish) path | |
set -U fish_user_paths /usr/local/bin $fish_user_paths | |
set PATH (string match -v /usr/local/bin $PATH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -c "import mymodule, code; code.interact(local=locals())" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fetch --all | |
# reset master to upstream/master | |
git checkout master | |
git reset --hard upstream/master | |
git push --force | |
# replay the patches (even they are rejected for now) on top of master | |
git checkout mybranch | |
git rebase master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using ServiceStack; | |
using ServiceStack.Text; | |
public class GithubRepository | |
{ | |
public string Name { get; set; } | |
public string Description { get; set; } | |
public string Url { get; set; } | |
public string Homepage { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%s/Assert\.AreEqual(\(.*\), \(.*\))/\1.Should().Be(\2)/g | |
%s/Assert\.IsTrue(\(.*\))/\1.Should().BeTrue()/g | |
%s/Assert\.IsFalse(\(.*\))/\1.Should().BeFalse()/g | |
%s/Assert\.IsNull(\(.*\))/\1.Should().BeNull()/g | |
%s/Assert\.IsNotNull(\(.*\))/\1.Should().NotBeNull()/g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text.RegularExpressions; | |
using ServiceStack.Text; | |
var exp = @"([\@\[]*[\w, ]+[\]]*)"; | |
var regex = new Regex(exp); | |
var parts = new List<string>{"This","is","@[my]","test","of","@[the]]", | |
"@[my]","test","for","@[[this]","@[bob wiley]", | |
"@is","@[my, comma]","the","end"}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
# This script formats sources in Djinni with standard whitespace conventions. | |
# Specifically, tabs are converted to spaces (2 for Scala, 4 for other languages), | |
# and trailing whitespace is removed. | |
# This script is idempotent, so can be safely run on existing code without making changes. | |
set -eu | |
# Locate the script file. Cross symlinks if necessary. | |
loc="$0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#OS junk files | |
[Tt]humbs.db | |
*.DS_Store | |
#Visual Studio files | |
*.[Oo]bj | |
*.user | |
*.aps | |
*.pch | |
*.vspscc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
using ServiceStack; | |
using ServiceStack.Text; | |
class SessionResponse | |
{ | |
public string Name { get; set; } |
NewerOlder