Skip to content

Instantly share code, notes, and snippets.

@cth
cth / re2fa.pl
Created May 6, 2009 11:22
converts regex -> NFA -> DFA
:- use_module(library(chr)).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This program performs conversions from
% regex -> NFA -> DFA
%
% It consists of three parts:
% 1. A regular expression parser (DCG)
% 2. A CHR program for converting DCG parse tree to an NFA
% 3. A CHR program for converting the NFA to a DFA
@ymurase
ymurase / asio_client.cpp
Created November 15, 2014 08:07
A sample of synchronous TCP client using boost::asio.
#include <iostream>
#include <boost/asio.hpp>
namespace asio = boost::asio;
int main() {
asio::io_service io_service;
asio::ip::tcp::socket socket(io_service);
socket.connect( asio::ip::tcp::endpoint( asio::ip::address::from_string("127.0.0.1"), 31400 ) );
@kristopolous
kristopolous / hn_seach.js
Last active July 24, 2023 04:12
hn job query search
// Usage:
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread
// then use as follows:
//
// query(term | [term, term, ...], term | [term, term, ...], ...)
//
// When arguments are in an array then that means an "or" and when they are seperate that means "and"
//
// Term is of the format:
// ((-)text/RegExp) ( '-' means negation )
@bishboria
bishboria / springer-free-maths-books.md
Last active June 8, 2024 06:39
Springer made a bunch of books available for free, these were the direct links