Skip to content

Instantly share code, notes, and snippets.

View txdv's full-sized avatar

Andrius Bentkus txdv

  • Lithuania, Vilnius
View GitHub Profile
@txdv
txdv / bot.cs
Created August 7, 2011 21:15
Example of custom bot for smartirc4net
using System;
using System.Collections.Generic;
using Manos.IO;
using Meebey.SmartIrc4net;
using SmartIrcBot4net;
namespace Test
{
public class AdminPlugin : IrcBotPlugin
@txdv
txdv / test.c
Created January 26, 2012 00:50
Example of the code I want to get going.
#include <ncurses.h>
int main(int argc, char **argv)
{
int i;
char buffer[512];
initscr();
nonl();
cbreak();
@txdv
txdv / dynamic-delegates.cs
Created April 14, 2012 12:39
Dynamic delegates!
using System;
using System.Reflection;
using System.Linq;
namespace testing
{
class DynamicDelegate
{
public MethodInfo Method { get; protected set; }
public string Name { get; protected set; }

This is my awesome c code:

#include <stdio.h>

int main(void) {
   return 0;
}
@txdv
txdv / BitArraySegment.cs
Created November 7, 2012 15:38
Bit manipulation classes for C#
using System;
using System.Collections;
using System.Collections.Generic;
namespace System
{
public class BitArraySegment : IEnumerable<bool>
{
public BitArrayWrapper Array { get; private set; }
public int Offset { get; private set; }
@txdv
txdv / TimesExtensions.cs
Created November 13, 2012 13:50
Times extension for .net numbers
using System;
namespace System
{
public static class TimesExtensions
{
public static void Times(this byte times, Action cb)
{
times.Times((i) => { cb(); });
}
@txdv
txdv / gist:5474093
Created April 27, 2013 18:30
orphan commit creation
var blob = repo.ObjectDatabase.CreateBlob("index.txt");
var treeDefinition = new TreeDefinition();
treeDefinition.Add("index.txt", blob, Mode.NonExecutableFile);
var tree = repo.ObjectDatabase.CreateTree(treeDefinition);
var commit = repo.ObjectDatabase.CreateCommit("Hello World",
new Signature("name", "mail", DateTimeOffset.Now),
new Signature("name", "mail", DateTimeOffset.Now),
tree, new Commit[0]);

Upcoming Features in C#

Mads Torgersen, MSFT

This document describes the C# language features currently featured in the March CTP. There's also discussion of a few of the VB features in the preview, where those are intended to be eventually implemented in C# as well.

Note that we have more language features planned that are not yet implemented. So look out for more to come in future CTPs and eventually a shipping version of C#.

@txdv
txdv / README.md
Last active August 29, 2015 14:05
Install script for mono for debian based distributions.

Install latest and newest mono!

So you want to install mono on Debian/Ubuntu?

But doing all the steps on your own is hard?

Just run the scripts and everything will be done for you!

./install-mono.sh
@txdv
txdv / README.MD
Created September 1, 2014 21:40
valve information

Read me please