Skip to content

Instantly share code, notes, and snippets.

View mikalv's full-sized avatar

Mikal mikalv

View GitHub Profile
@mikalv
mikalv / sslclient.cpp
Last active August 29, 2015 14:04
i2pd, SSLClient (Unfinished class)
#include "sslclient.h"
#include "Log.h"
SSLClient::SSLClient(boost::asio::io_service& io_service,
boost::asio::ssl::context& context,
boost::asio::ip::tcp::resolver::iterator endpoint_iterator, char request[max_length])
: m_socket(io_service, context), m_request(request)
{
m_socket.set_verify_mode(boost::asio::ssl::verify_peer);
@mikalv
mikalv / boost.sh
Last active August 29, 2015 14:09 — forked from rsobik/boost.sh
#===============================================================================
# Filename: boost.sh
# Author: Pete Goodliffe
# Copyright: (c) Copyright 2009 Pete Goodliffe
# Licence: Please feel free to use this, with attribution
# Modified version
#===============================================================================
#
# Builds a Boost framework for the iPhone.
# Creates a set of universal libraries that can be used on an iPhone and in the
@mikalv
mikalv / boost.sh
Last active August 29, 2015 14:09 — forked from faithfracture/boost.sh
# Builds a Boost framework for the iPhone.
# Creates a set of universal libraries that can be used on an iPhone and in the
# iPhone simulator. Then creates a pseudo-framework to make using boost in Xcode
# less painful.
#
# To configure the script, define:
# BOOST_LIBS: which libraries to build
# IPHONE_SDKVERSION: iPhone SDK version (e.g. 5.1)
#
# Then go get the source tar.bz of the boost you want to build, shove it in the
@mikalv
mikalv / nginx.conf
Last active August 29, 2015 14:13 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@mikalv
mikalv / getBlockLists.sh
Last active August 29, 2015 14:26 — forked from johntyree/getBlockLists.sh
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@mikalv
mikalv / proxy.go
Created March 7, 2016 17:14 — forked from vmihailenco/proxy.go
Simple TCP proxy in Golang
package main
import (
"bytes"
"encoding/hex"
"flag"
"fmt"
"io"
"log"
"net"
#!/usr/local/bin/python
import pyPdf
import sys
def main():
pdf = pyPdf.PdfFileReader(open(sys.argv[0]))
if pdf.getIsEncrypted():
print "Kryptert"
else:
print "Ikke kryptert"
@mikalv
mikalv / bitcoin_spv_wallet_overview.md
Created June 30, 2016 18:41 — forked from TOMOAKI12345/bitcoin_spv_wallet_overview.md
Bitcoin SPV Wallet Flow Overview

@mikalv
mikalv / fuck-openldap.sh
Created July 14, 2016 10:34 — forked from jaseg/README.md
Convert openldap .schema files to .ldif files
#!/usr/bin/env bash
# convert OpenLDAP schema file to LDIF file
#
# Copyright 2012 NDE Netzdesign und -entwicklung AG, Hamburg
# Written by Jens-U. Mozdzen <jmozdzen@nde.ag>
# Copyright 2014 jaseg <github@jaseg.net>
#
# Permission is granted to use, modify and redistribute this file as long as
# - this copyright notice is left unmodified and included in the final code
@mikalv
mikalv / simple-gpg-enc.go
Created July 20, 2016 12:30 — forked from stuart-warren/simple-gpg-enc.go
golang gpg/openpgp encryption/decryption example
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"encoding/base64"
"io/ioutil"
"log"
"os"
)