Skip to content

Instantly share code, notes, and snippets.

View AtnNn's full-sized avatar
:shipit:

Etienne Laurin AtnNn

:shipit:
View GitHub Profile
require 'rethinkdb'
include RethinkDB::Shortcuts
doc = {
:archived_date => nil,
:archived_parent_task_guid => nil,
:archived_tree_guid => nil,
:archived_tree_path => "",
:assigned_to_guid => "d0b93cc0-1a4b-4513-98a8-daccb341df23",
:change_date => "2012-06-27T10:04:50Z",
--- web_new/js/rethinkdb.js 2014-02-07 15:31:14.387675225 -0800
+++ build/release_clang/rethinkdb_web_assets/js/rethinkdb.js 2014-02-07 15:54:45.097062708 -0800
@@ -20,7 +20,7 @@
module.exports = rethinkdb;
-},{"./ast":1,"./errors":4,"./net":3,"./protobuf":2}],4:[function(require,module,exports){
+},{"./ast":1,"./errors":4,"./net":2,"./protobuf":3}],4:[function(require,module,exports){
// Generated by CoffeeScript 1.4.0
#include <string>
#include <re2/re2.h>
#include <iostream>
void test_encoding(std::string enc, bool ignored){
std::cout << "testing " << enc << "\n";
RE2 re2_parser("^\\s*([\\w-]+|\\*)\\s*(?:;\\s*q\\s*=\\s*([0-9]+(?:\\.[0-9]+)?)\\s*)?(?:,|$)");
re2::StringPiece encodings_re2(enc);
std::string name;
std::string qvalue;
while (RE2::FindAndConsume(&encodings_re2, re2_parser, &name, &qvalue)) {
rethinkdb/packaging/ami$ ./build-ami.sh --ami-name rethinkdb-1.15.0-1
Starting RethinkDB AMI creation process
Using existing security group 'ssh-only'
Using key atnnn-0
Launching base instance from ami ami-8caa1ce4 in group ssh-only on machine t1.micro with key atnnn-0
Waiting for instance i-6aa43984 to start..
Instance status: pending
Attempting to connect to ec2-54-161-223-83.compute-1.amazonaws.com (20 tries left)
ssh: connect to host ec2-54-161-223-83.compute-1.amazonaws.com port 22: Connection timed out
Attempting to connect to ec2-54-161-223-83.compute-1.amazonaws.com (19 tries left)

Linux signals reading list

@AtnNn
AtnNn / keybase.md
Created August 28, 2015 23:59
keybase.md

Keybase proof

I hereby claim:

  • I am atnnn on github.
  • I am atnnn (https://keybase.io/atnnn) on keybase.
  • I have a public key whose fingerprint is 9AD1 0362 2137 9ED4 723C 24C1 BA1F 6F51 93F6 2C3B

To claim this, I am signing this object:

$ gnutls-cli --print-cert curl.haxx.se
Processed 174 CA certificate(s).
Resolving 'curl.haxx.se'...
Connecting to '80.67.6.50:443'...
- Certificate type: X.509
- Got a certificate list of 2 certificates.
- Certificate[0] info:
- subject `CN=curl.haxx.se', issuer `C=US,O=Let's Encrypt,CN=Let's Encrypt Authority X1', RSA key 2048 bits, signed using RSA-SHA256, activated `2016-01-28 22:05:00 UTC', expires `2016-04-27 22:05:00 UTC', SHA-1 fingerprint `707b72e91e34caefe7e6fbd9aa7d6631a75f9b4b'
Public Key ID:
@AtnNn
AtnNn / pdbdump.c
Created February 10, 2016 21:16 — forked from mridgers/pdbdump.c
Small tool to list and query symbols in PDB files.
//------------------------------------------------------------------------------
// pdbdump.c - dump symbols from .pdb and executable files (public domain).
// - to compile; cl.exe /Ox /Zi pdbdump.c
// -
// - Martin Ridgers, pdbdump 'at' fireproofgravy.co.uk
//------------------------------------------------------------------------------
#include <stdio.h>
#include <Windows.h>
#include <DbgHelp.h>
@AtnNn
AtnNn / output.txt
Created March 19, 2016 22:55
testing PostQueuedCompletionStatus
queueing 10 events: average 0.500000ms per call, dequeued
queueing 100 events: average 0.550000ms per call, dequeued
queueing 1000 events: average 0.568000ms per call, dequeued
queueing 10000 events: average 0.585400ms per call, dequeued
queueing 100000 events: average 0.568470ms per call, dequeued
queueing 1000000 events: average 0.436295ms per call, dequeued
queueing 10000000 events: average 0.444731ms per call, dequeued
queueing 100000000 events: average 0.452936ms per call^C
#include "rethinkdb.h"
int main() {
try {
std::unique_ptr<RethinkDB::Connection> conn = RethinkDB::connect("localhost", 28015);
RethinkDB::Cursor cursor = RethinkDB::table("leaderboard").order_by("score").limit(2).run(*conn);
for (auto score = cursor.begin(); score != cursor.end(); ++score) {
printf("datum: %s\n", RethinkDB::write_datum(*score).c_str());
}
} catch (RethinkDB::Error &err) {