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
<?xml version="1.0" encoding="UTF-8"?> | |
<scheme name="M4L73" version="124" parent_scheme="Default"> | |
<option name="LINE_SPACING" value="1.2" /> | |
<option name="EDITOR_FONT_SIZE" value="14" /> | |
<option name="CONSOLE_FONT_NAME" value="DejaVu Sans Mono" /> | |
<option name="CONSOLE_FONT_SIZE" value="12" /> | |
<option name="CONSOLE_LINE_SPACING" value="1.0" /> | |
<option name="EDITOR_FONT_NAME" value="DejaVu Sans Mono" /> | |
<colors> | |
<option name="CARET_COLOR" value="ffffff" /> |
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; | |
namespace ExpressionTest | |
{ | |
public class ExternalPerson | |
{ | |
public int Id { get; set; } | |
public string FirstName { | |
get; |
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
public sealed class Isolated<T> : IDisposable where T : MarshalByRefObject | |
{ | |
private AppDomain _domain; | |
private T _value; | |
public Isolated() | |
{ | |
_domain = AppDomain.CreateDomain("Isolated:" + Guid.NewGuid(), | |
null, AppDomain.CurrentDomain.SetupInformation); |
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
#!/bin/sh | |
# location: /etc/initramfs-tools/hooks/crypt_unlock.sh | |
PREREQ="dropbear" | |
prereqs() { | |
echo "$PREREQ" | |
} |
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
public static class XmlExtensions | |
{ | |
/// <summary> | |
/// Cache serialization assemblies | |
/// </summary> | |
private static readonly Dictionary<RuntimeTypeHandle, XmlSerializer> serializer_cache = new Dictionary<RuntimeTypeHandle, XmlSerializer>(); | |
/// <summary> | |
/// used to remove obsolete xsd: and xsi: namespaces. | |
/// </summary> |
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 branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch and set local branch to track the new remote |
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.Collections.Generic; | |
using System.Threading; | |
/// <summary> | |
/// Simple helper to implement retry logic | |
/// </summary> | |
/// <example> | |
/// // Retry 5 times with a break of 30 seconds. | |
/// Retry.Do(() => MyMethod(), TimeSpan.FromSeconds(30), 5) |
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
private static Main() | |
{ | |
var outputFile = $"results_{taskId}.txt"; | |
using (var output = File.CreateText(WorkingDir(outputFile))) | |
{ | |
output.WriteLine("This is the results file"); | |
} | |
// Persist the task output to Azure Storage | |
Task.WaitAll( | |
taskStorage.SaveAsync(TaskOutputKind.TaskOutput, outputFile) |
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 NUnit.Framework; | |
namespace Jaber.Tests | |
{ | |
using Microsoft.Extensions.Configuration; | |
/// <summary> | |
/// Just an example class that contains my special configuration | |
/// </summary> | |
public class MySpecialConfig |
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
sub openurl { | |
my $url = shift; | |
my $platform = $^O; | |
my $cmd; | |
if ($platform eq 'darwin') { $cmd = "open \"$url\""; } # OS X | |
elsif ($platform eq 'MSWin32' or $platform eq 'msys') { $cmd = "start \"\" \"$url\""; } # Windows native or MSYS / Git Bash | |
elsif ($platform eq 'cygwin') { $cmd = "cmd.exe /c start \"\" \"$url \""; } # Cygwin; !! Note the required trailing space. | |
else { $cmd = "xdg-open \"$url\""; } # assume a Freedesktop-compliant OS, which includes many Linux distros, PC-BSD, OpenSolaris, ... | |
if (system($cmd) != 0) { | |
die "Cannot locate or failed to open default browser; please open '$url' manually."; |
OlderNewer