Skip to content

Instantly share code, notes, and snippets.

View mpictor's full-sized avatar

Mark mpictor

  • Austin, TX
View GitHub Profile
@karthick18
karthick18 / splice.c
Created September 22, 2011 06:31
An example copy of a file to output file using the splice syscall that avoids copying to/from user space buffers to kernel space by employing pipe buffers allocated in kernel space for fast data transfers between 2 files
/*
* An example using splice syscall which avoids copying to/from user space buffers to kernel space
* and uses the pipe buffers allocated in kernel space as an intermediate to directly xfer from one file to another
*
* gcc -o splice splice.c -g
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <string.h>
@spikebike
spikebike / client.go
Created March 29, 2012 01:13
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
@l0ki000
l0ki000 / csd-wrapper.sh
Last active January 19, 2024 11:56 — forked from zer4tul/gist:6477470
Cisco Anyconnect CSD wrapper for OpenConnect (exhanced to autodownload and autoupdate hostscan)
#!/bin/bash
# Cisco Anyconnect CSD wrapper for OpenConnect
# Enter your vpn host here
CSD_HOSTNAME=
if [[ -z ${CSD_HOSTNAME} ]]
then
echo "Define CSD_HOSTNAME with vpn-host in script text. Exiting."
exit 1
fi