Skip to content

Instantly share code, notes, and snippets.

View shell_ip_address,sh
ip=`ip address show | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p'`
@NN---
NN--- / .editorconfig
Last active Mar 19, 2021 — forked from cezarypiatek/.editorconfig
This snippet set severity level to error for different rules related to the reference nullability
View .editorconfig
[*.cs]
# CS8600: Converting null literal or possible null value to non-nullable type.
dotnet_diagnostic.CS8600.severity = error
# CS8602: Dereference of a possibly null reference.
dotnet_diagnostic.CS8602.severity = error
# CS8603: Possible null reference return.
dotnet_diagnostic.CS8603.severity = error
# CS8604: Possible null reference argument.
dotnet_diagnostic.CS8604.severity = error
# CS8605: Unboxing a possibly null value.
@NN---
NN--- / custommarshaler.cs
Last active Jul 26, 2017
PInvoke SafeHandle via interface
View custommarshaler.cs
using System;
using System.Runtime.InteropServices;
using FILETIME=System.Runtime.InteropServices.ComTypes.FILETIME;
namespace ConsoleApp4
{
interface ISafeProcessHandle
{
}
View cast-operator.n
class A
{
public static @:(a: A) : int { 0 } // implicit
public static @:>(a: A) : int { 2 } // explicit
}
View gist:9156961

| | Grouping ||

First Header Second Header Third Header
Content Long Cell
Content Cell Cell

New section | More | Data | And more | And more | [Prototype table]

View gist:8799708
// Dummy - Define ctor
var Dummy$ctor = {};
// Dummy - Constructors body
Dummy$ctor[""] = function() {}
// Dummy - Init
function Dummy() {
var _nw_self = this;
// Dummy - Properties
View gist:7515049
using Nemerle.Collections;
using System.Console;
module Program
{
F(l : list[string],
f : string -> list[string]) : list[list[string]]
{
def impl(l, acc)
{
View gist:7186701
using System;
using System.Console;
using M;
class Test
{
public static @()(this _ : this, s : string) : void
{
}
}
View gist:4502060
public class NameListPage
{
public Name : string
{
mutable _name : string;
get
{
server.GetName(name => { ServerName = name });
_name
}