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 <cassert> | |
#include <chrono> | |
#include <iostream> | |
#include <random> | |
#include <string> | |
#include <thread> | |
#define count(x) (sizeof(x)/sizeof(*(x))) | |
std::mt19937 rnd(std::random_device{}()); |
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
#------------------------------------------------- | |
# | |
# Project created by QtCreator 2014-02-28T17:28:33 | |
# | |
#------------------------------------------------- | |
QT += core gui opengl openglextensions | |
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets |
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
# -*- encoding: utf-8 -*- | |
import sys | |
# Complicated stuff | |
import sip | |
api2_classes = [ | |
'QData', 'QDateTime', 'QString', 'QTextStream', | |
'QTime', 'QUrl', 'QVariant'] | |
for cl in api2_classes: |
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
# Python's handling of certificate verification is irresponsible and wrong. | |
# Having to include the code below to get what should be the only acceptable | |
# default behavior is a shame | |
# Code from https://gist.github.com/schlamar/2993700 | |
import httplib | |
import urllib2 | |
import ssl |
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
import contextlib | |
import os | |
import sys | |
import tarfile | |
import traceback | |
VERSION = sys.version_info[0] | |
PY3 = VERSION == 3 |
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
using PyCall | |
@pyimport sys | |
@pyimport sip | |
# Complicated stuff | |
api2_classes = [ | |
"QData", "QDateTime", "QString", "QTextStream", | |
"QTime", "QUrl", "QVariant"] | |
for cl = api2_classes |
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
import sys | |
from twisted.internet import interfaces, reactor | |
from twisted.python.runtime import platform | |
from zope.interface import implements | |
# Adapted from paramiko demo code | |
# Original note: thanks to Mike Looijmans for this code | |
class WindowsIO(object): | |
implements(interfaces.ITransport) |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.define "master", primary: true do |m| | |
m.vm.box = "remram/debian-7-amd64" | |
m.vm.network "private_network", ip: "10.4.8.11" | |
m.vm.provider "virtualbox" do |v| |
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 | |
set -e | |
ca_conf=' | |
[ ca ] | |
default_ca = ca_default | |
[ ca_default ] | |
dir = ./ |
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
NOPE HAHA |
OlderNewer