Skip to content

Instantly share code, notes, and snippets.

View Ge0's full-sized avatar
🛌
Coding in my bed.

Geoffrey ROYER Ge0

🛌
Coding in my bed.
View GitHub Profile
#include <iostream>
#include <boost/asio.hpp>
class Contextable {
public:
Contextable(boost::asio::io_context& ctx) : m_ioContext(ctx) {}
protected:
boost::asio::io_context& m_ioContext;
};
#include <iostream>
#include <memory>
class B;
class A {
public:
A() : m_b(nullptr){}
void setB(std::shared_ptr<B> b) {
#!/usr/bin/env python
import random
secret_number = random.randint(0, 100)
guesses = 0
number = 0
while "The input number is incorrect":
number = input("Take your guess: ")
/* gcc -o test-pem test-pem.c -lssl -lcrypto */
#include <stdio.h>
#include <stdlib.h>
#include <openssl/pem.h>
int main(int argc, char* argv[]) {
FILE *fp = NULL;
EVP_PKEY* key = NULL;
@Ge0
Ge0 / snippet.py
Created February 5, 2018 21:30
Prime number next to X
x=input()+1
while 1:
if(all(x%j for j in range(2,int(x**.5)+1))):print([x,2][x==1]);break
x+=1
@Ge0
Ge0 / game.c
Last active November 12, 2017 18:29
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define MIN 1
#define MAX 100
/**
* @brief Pick up a random number between @p min and @p max.
#!/usr/bin/env python3
_HANDLERS = {}
def handle(key):
def wrapper(func):
_HANDLERS[key] = func
return wrapper
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <tls.h>
int main(int argc, char** argv) {
char buf[8192];
tls_init();
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <tls.h>
int main(int argc, char** argv) {
char buf[8192];
tls_init();