Skip to content

Instantly share code, notes, and snippets.

View SjB's full-sized avatar

Steve Beaulac SjB

  • London Ontario Canada
View GitHub Profile

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
571fc48d46435c237a30
var mu = require('mu2'),
fs = require('fs'),
beautify_html = require('js-beautify').html
path = require('path');
var config = {
tpldir: 'templates',
outdir: 'web',
beautify_opts: { 'indent_inner_html': true, 'wrap_line_length': 120 }
}
@SjB
SjB / keybase.md
Created September 30, 2014 05:46

Keybase proof

I hereby claim:

  • I am sjb on github.
  • I am stevebeaulac (https://keybase.io/stevebeaulac) on keybase.
  • I have a public key whose fingerprint is 8BBF 6CD5 03ED F039 2A58 8AEE 5CFA D99B 4FCD 3286

To claim this, I am signing this object:

@SjB
SjB / build.cmd
Last active September 8, 2015 18:32
Windows csharp build script
@echo Off
setlocal
set NUGETURL="http://nuget.org/nuget.exe"
set TOOLSDIR=tools
set NUGET=%TOOLSDIR%\NuGet.exe
set CAKE=%TOOLSDIR%\Cake\Cake.exe
IF NOT EXIST %TOOLSDIR% mkdir %TOOLSDIR%
@SjB
SjB / build.sh
Last active September 8, 2015 18:32
Linux csharp build script
#!/usr/bin/env bash
set -e
set -o pipefail
NUGETURL="http://nuget.org/nuget.exe"
TOOLSDIR=tools
NUGET="$TOOLSDIR/NuGet.exe"
CAKE="$TOOLSDIR/Cake/Cake.exe"
@SjB
SjB / build.cake
Last active October 23, 2015 16:26
sample build cake file
// Copyright (c) 2015 Sagacity Solutions Inc. All right reserved.
var project = "ProjectName";
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
var platform = Argument("platform", "");
var prefix = Argument("prefix", "/" + project);
@SjB
SjB / build.cake
Last active September 17, 2015 18:51
cake git function
Func<IEnumerable<string>, int> Git = delegate(IEnumerable<string> arguments) {
var processArgs = new ProcessArgumentBuilder();
foreach (var arg in arguments)
processArgs.Append(arg);
return StartProcess("git", new ProcessSettings { Arguments = processArgs});
};
@SjB
SjB / build.cake
Last active September 23, 2015 04:17
Run a CSharp executable (uses mono on Unix)
Func<FilePath, IEnumerable<string>, int> CsProc = delegate(FilePath proc, IEnumerable<string> arguments) {
var processArgs = new ProcessArgumentBuilder();
FilePath process;
Information(proc.ToString());
if (IsRunningOnWindows()) {
process = proc;
} else {
processArgs.Append(proc.ToString());
process = File("mono");
@SjB
SjB / build.cake
Last active September 23, 2015 04:16
Run a external CakeScript with the same arguments
Action<FilePath, string> CakeScript = delegate(FilePath script, string tgt) {
var args = new Dictionary<string,string>() {
{"target", tgt},
{"configuration", configuration},
{"platform", platform}
};
CakeExecuteScript(File("./Attenuator/build.cake"), new CakeSettings { Arguments = args });
};