Skip to content

Instantly share code, notes, and snippets.

Andrius Bentkus txdv

Block or report user

Report or block txdv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Test.cs
using System;
public static class Main
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World");
}
}
@txdv
txdv / Main.cs
Created Apr 3, 2017
Hello World
View Main.cs
public class Main
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World");
}
}
@txdv
txdv / exceptions.cs
Last active Feb 15, 2017
Can not yield from finally block
View exceptions.cs
using System;
using System.Collections.Generic;
public class MainClass
{
public static IEnumerable<string> Actions()
{
try {
yield return "try";
} catch (Exception) {
@txdv
txdv / Makefile
Last active Nov 16, 2016
Example
View Makefile
main.exe: main.cs
mcs /unsafe main.cs
@txdv
txdv / pipe_with_atime.c
Created Nov 10, 2016 — forked from JackDrogon/pipe_with_atime.c
pipe atime benckmark
View pipe_with_atime.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <pthread.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <linux/unistd.h>
@txdv
txdv / nf.c
Created Sep 21, 2016 — forked from Taehun/nf.c
Linux Kernel Module Example: Netfilter
View nf.c
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/netfilter_ipv4.h>
#include <linux/skbuff.h>
#include <linux/udp.h>
#include <linux/ip.h>
/* This function to be called by hook. */
static unsigned int
hook_func(unsigned int hooknum,
@txdv
txdv / Makefile
Last active Mar 23, 2016 — forked from mhanne/Makefile
libotr usage example
View Makefile
all: example
example: example.c
gcc example.c -lotr -o example
.PHONY: clean
clean:
rm -f example
@txdv
txdv / bridge.diff
Last active Aug 29, 2015 — forked from anonymous/-
View bridge.diff
diff --git a/Bridge/Resources/bridge.js b/Bridge/Resources/bridge.js
index 3d92710..0da0eb1 100755
--- a/Bridge/Resources/bridge.js
+++ b/Bridge/Resources/bridge.js
@@ -1,4 +1,4 @@
-/*
+/*
* @version : 1.8.0 - Bridge.NET
* @author : Object.NET, Inc. http://bridge.net/
* @date : 2015-08-17
@txdv
txdv / Example.cs
Last active Aug 29, 2015
Strange behaviour on mono
View Example.cs
using System;
using System.Linq;
public class Example
{
public static void Main(string[] args)
{
Console.WriteLine(string.Join("\r\n", typeof(string[]).GetInterfaces().Select(i => i.Name)));
}
}
@txdv
txdv / code.cs
Last active Aug 29, 2015
Cruel code
View code.cs
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using LibuvSharp;
using LibuvSharp.Threading;
using LibuvSharp.Threading.Tasks;
You can’t perform that action at this time.