This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * An example of stream wrapper around an ssl stream supporting both HTTP and WebSocket requests. | |
| * | |
| * The current version is mainly a copy/paste of the existing boost::asio::ssl stream. | |
| * The filtering logic is inside the mutate method, which takes an iterator on the MutableBufferSequence (it can be greatly improved obviously). | |
| * Currently, only asynchronous reads are mutated, but using mutable for synchronous reads should be easy to do. | |
| * | |
| * Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com | |
| * Copyright (c) 2005-2008 Christopher M. Kohlhoff (chris at kohlhoff dot com) | |
| * Copyright (c) 2018 Hugo Guiroux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Script to build a kernel | |
| # Author: Hugo Guiroux <hugo.guiroux@gmail.com> | |
| # Version from command line. Ex: 4.4 | |
| VERSION="$1" | |
| echo "Installing dependencies" | |
| apt-get install -y git-core kernel-package fakeroot build-essential libncurses5-dev python-pip wget xz-utils |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| obj-m := my_module.o | |
| KDIR := /lib/modules/$(shell uname -r)/build | |
| PWD := $(shell pwd) | |
| default: | |
| $(MAKE) -C $(KDIR) M=$(PWD) modules | |
| unload: | |
| sudo rmmod ./my_module.ko | |
| load: | |
| sudo insmod ./my_module.ko |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <cstring> | |
| #define LOOP_COUNT 1000000000 | |
| unsigned long long rdtscl(void) | |
| { | |
| unsigned int lo, hi; | |
| __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi)); | |
| return ( (unsigned long long)lo)|( ((unsigned long long)hi)<<32 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM debian:stable | |
| MAINTAINER Hugo Guiroux <gx.hugo+githubdocker@gmail.com> version: 0.1 | |
| # Install tools to build | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| git \ | |
| wget && \ | |
| rm -rf /var/lib/apt/lists/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python2 | |
| # This is a simple RC4 python2 implementation as an iterator. | |
| # | |
| # Copyright (c) 2015 Hugo Guiroux: http://hugoguiroux.blogspot.fr/ | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions are met: | |
| # | |
| # * Redistributions of source code must retain the above copyright notice, this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python2 | |
| # Author: Hugo Guiroux: http://hugoguiroux.blogspot.fr/ | |
| import sys | |
| from PIL import Image | |
| import random | |
| # The output image (bmp) | |
| img_name = "wolf.bmp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Author: Hugo Guiroux: http://hugoguiroux.blogspot.fr/ */ | |
| #include <unistd.h> | |
| #include <stdio.h> | |
| #include <sys/types.h> | |
| #include <sys/socket.h> | |
| #include <fcntl.h> | |
| #include <string.h> | |
| #include <errno.h> | |
| int main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Author: Hugo Guiroux: http://hugoguiroux.blogspot.fr/ | |
| package main | |
| import ( | |
| "code.google.com/p/go.net/proxy" | |
| "flag" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "net" |