Skip to content

Instantly share code, notes, and snippets.

View webmaster128's full-sized avatar

Simon Warta webmaster128

View GitHub Profile
Blob size 64 bytes, DB size 12291072 bytes, performance boost 0.981000x
Blob size 128 bytes, DB size 11110400 bytes, performance boost 0.973000x
Blob size 256 bytes, DB size 12290048 bytes, performance boost 0.961000x
Blob size 512 bytes, DB size 19343360 bytes, performance boost 0.964000x
Blob size 1024 bytes, DB size 9975808 bytes, performance boost 1.941000x
Blob size 2048 bytes, DB size 9315328 bytes, performance boost 2.816000x
Blob size 4096 bytes, DB size 8983552 bytes, performance boost 4.490000x
Blob size 8192 bytes, DB size 8817664 bytes, performance boost 9.133000x
Blob size 16384 bytes, DB size 8731648 bytes, performance boost 16.921000x
Blob size 32768 bytes, DB size 8705024 bytes, performance boost 31.446000x
@webmaster128
webmaster128 / main.qml
Created December 23, 2014 21:44
Qml SpinBox minimumValue change over time
import QtQuick 2.3
import QtQuick.Controls 1.2
Column {
width: 640
height: 480
SpinBox {
id: spin
value: 2
@webmaster128
webmaster128 / Output
Created December 23, 2014 22:05
Property evaluation order
Start [...]/qmlscene...
qml: SpinBox1: max=4
qml: SpinBox1: min=3
@webmaster128
webmaster128 / gist:24224e1becd423d47afe
Created January 20, 2015 21:46
Botan OSX build command
./configure.py --with-build-dir=../build-botan --link-method=copy --cc=clang
make -f ../build-botan/Makefile
macx {
QMAKE_MAC_SDK = macosx10.9
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
}
@webmaster128
webmaster128 / gist:58698f7917ecd2fd62c7
Created February 13, 2015 13:53
qmake windows target check
win32 {
message(win32)
}
win64 {
message(win64)
}
@webmaster128
webmaster128 / bar.cpp
Created February 17, 2015 22:54
Q_INVOKABLE and namespaces example
#include "bar.h"
namespace Foo {
Bar::Bar(QObject *parent) : QObject(parent)
{
}
Bar *Bar::run()
{
@webmaster128
webmaster128 / createHashDownload.php
Created March 4, 2015 11:53
Create certificate validation hash
<?php
createDownload($_REQUEST['csr']);
function createDownload($csr_content)
{
# Write CSR content into csr.pem
file_put_contents("csr.pem", $csr_content)
or die("PEM file could not be written. Write permissions set?\n");
Process: botan-test [99217]
Path: /Users/USER/*/botan-test
Identifier: botan-test
Version: 0
Code Type: X86-64 (Native)
Parent Process: bash [98726]
Responsible: Terminal [98708]
User ID: 501
Date/Time: 2015-03-12 11:22:49.528 +0100
#!/bin/bash
suites=(block modes aead ocb stream hash mac pbkdf kdf keywrap transform rngs passhash9 bcrypt cryptobox tss rfc6979 bigint rsa rw dsa nr dh dlies elgamal ecc_pointmul ecdsa gost_3410 curve25519 mceliece ecc_unit ecdsa_unit ecdh_unit pk_keygen cvc x509 nist_x509 tls)
for suite in "${suites[@]}"; do
echo "Run test '$suite' ..."
./botan-test "$suite"
retval=$?
if [[ $retval != 0 ]]; then
echo "Error in last test! Return value: $retval"