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 / info.md
Created September 1, 2014 21:41
dota2 crash
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:        12.04
Codename:       precise

I am using the AWM

@txdv
txdv / install.sh
Last active August 29, 2015 14:06
Build script for pam_ssh_agent_auth
#!/bin/bash
# site: https://sites.google.com/site/trevelyansmisc/tech-stuff/sudo-ssh-keyagent-authentication
LINK="pam_ssh_agent_auth-0.10.2.tar.bz2 http://downloads.sourceforge.net/project/pamsshagentauth/pam_ssh_agent_auth/v0.10.2/pam_ssh_agent_auth-0.10.2.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fpamsshagentauth%2F&ts=1410869486&use_mirror=netcologne"
wget -O $LINK
tar xvf pam_ssh_agent_auth-0.10.2.tar.bz2
sudo apt-get install -y autotools-dev libssl-dev libpam0g-dev
@txdv
txdv / README.md
Last active August 29, 2015 14:10
A description of what I am trying to plan to do with Mono Coroutines.

I have written a wrapper for libuv in C#. libuv is the IO abstraction for node.js.

libuv basically exposes an event loop for IO (it abstracts all the different platforms away).

Now the problem that I face is that I have a callback based API everywhere and that sucks, because of the constant indentation and rather hard programming against the API:

var server = new TcpListener();
server.Bind("127.0.0.1", 8000);
server.Connection += () => {
@txdv
txdv / test.cs
Last active August 29, 2015 14:11
Test example
using System;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using SharpTox.Core;
using SharpTox.Av;
using Xunit;
namespace SharpTox.Tests
@txdv
txdv / code.cs
Last active August 29, 2015 14:15
Cruel code
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;
@txdv
txdv / Example.cs
Last active August 29, 2015 14:22
Strange behaviour on mono
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 / bridge.diff
Last active August 29, 2015 14:27 — forked from anonymous/-
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 / Makefile
Last active March 23, 2016 01:27 — forked from mhanne/Makefile
libotr usage example
all: example
example: example.c
gcc example.c -lotr -o example
.PHONY: clean
clean:
rm -f example
@txdv
txdv / nf.c
Created September 21, 2016 05:55 — forked from Taehun/nf.c
Linux Kernel Module Example: Netfilter
#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 / pipe_with_atime.c
Created November 10, 2016 07:23 — forked from JackDrogon/pipe_with_atime.c
pipe atime benckmark
#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>