Skip to content

Instantly share code, notes, and snippets.

View jonasschneider's full-sized avatar

Jonas Schneider jonasschneider

View GitHub Profile
// PWM-modulierender und deswegen super-fehlertoleranter Software-UART. Oder so. V1.
// Verkabelung: Draht zwischen Pins 3 & 8.
const int aTxPin = 8;
//assume that pin 32 is receiving PWM input
#define CHANNEL_1_PIN 3
//micros when the pin goes HIGH
volatile unsigned long timer_start;
//difference between timer_start and micros() is the length of time that the pin
Bus 001 Device 003: ID 2341:8036 Arduino SA Leonardo (CDC ACM, HID)
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
vagrant@vagrant-ubuntu-trusty-64:/vagrant/controller/build$ sudo lsusb -v
Bus 001 Device 003: ID 2341:8036 Arduino SA Leonardo (CDC ACM, HID)
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
# Overhead Command Shared Object
# ........ ....... .................... ...........................................................................................................................
#
48.74% zbackup libcrypto.so.1.0.0 [.] sha256_block_data_order
|
--- sha256_block_data_order
|
|--0.01%-- 0x30d239287f56b094
--99.99%-- [...]
From bdd045842757f316123d295e4d71591b71e00b7f Mon Sep 17 00:00:00 2001
From: Jonas Schneider <[email protected]>
Date: Wed, 11 Mar 2015 10:25:35 +0100
Subject: [PATCH] Improve backup performance by initializing the
CodedOutputStream only once.
---
backup_creator.cc | 2 +-
backup_creator.hh | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
From ce4f2a8c91510d7032ab441c37f3b78de7cc72cb Mon Sep 17 00:00:00 2001
From: Jonas Schneider <[email protected]>
Date: Tue, 10 Mar 2015 23:48:42 +0100
Subject: [PATCH] backup_creator: naively buffer a couple of instructions to
avoid using the slow StringOutputStream
---
backup_creator.cc | 36 +++++++++++++++++++++++++++++++++++-
backup_creator.hh | 4 ++++
2 files changed, 39 insertions(+), 1 deletion(-)
# Overhead Command Shared Object
# ........ ....... .................... .....................................................................................................................
#
93.16% zbackup libc-2.19.so [.] memset
|
--- memset
|
|--99.99%-- std::string::append(unsigned long, char)
| google::protobuf::io::StringOutputStream::Next(void**, int*)
| google::protobuf::io::CodedOutputStream::Refresh()
[main] INFO spark.servlet.SparkFilter - StaticResourceHandler configured with folder = /public
Running in servlet container -- configuring from servlet context (usually from web.xml)
null
DB: CREATE TABLE IF NOT EXISTS experiment(id TEXT PRIMARY KEY NOT NULL, description TEXT DEFAULT '', budget INT, preview_click_count INT, hit_mturkid TEXT, finished INT, softfinished INT, answer_payment INT, rating_payment INT , basic_payment INT, statsid TEXT, ratingviewclass TEXT, sqltime TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, bonus_payment INT, tags INT, qualifications INT, hit_title INT, max_answers_per_assignment INT, max_ratings_per_assignment INT, hit_description INT);
DB: CREATE TABLE IF NOT EXISTS qualification(id TEXT PRIMARY KEY NOT NULL, text TEXT , experimentid TEXT NOT NULL);
DB: CREATE TABLE IF NOT EXISTS tag(id TEXT PRIMARY KEY NOT NULL, text TEXT , experimentid TEXT
vagrant@vagrant-ubuntu-trusty-64:/vagrant/mod$ nm --undefined-only a.out
U abort
U ceil
U ceilf
U exp
U exp2
U exp2f
U expf
U fflush
U floor
diff --git a/target-i386/seg_helper.c b/target-i386/seg_helper.c
index c98eeb4..fc72e4f 100644
--- a/target-i386/seg_helper.c
+++ b/target-i386/seg_helper.c
@@ -866,19 +866,24 @@ static void do_interrupt64(CPUX86State *env, int intno, int is_int,
}
if (load_segment(env, &e1, &e2, selector) != 0) {
+ qemu_log_mask(CPU_LOG_RESET, "XXXX load_segment\n");
raise_exception_err(env, EXCP0D_GPF, selector & 0xfffc);
Okay, this is getting ugly. For some reeeally unknown reason, this segfaults:
$ run_fis pry -rpg -e 'PG.connect({:host=>"127.0.0.1"})'
while this doesn't:
$ run_fis pry -rpg -e 'puts PG.connect({dbname: "fis"})'
I suspect it has something to do with authentication methods; while the first one uses TCP sockets and therefore can't use Linux SO_GETPEERCRED auth,
the other one can. Oh well.
--- a/vendor/bundle/ruby/2.1.0/gems/sequel-4.9.0/lib/sequel/adapters/postgres.rb 2014-08-26 20:31:38.000000000 +0000
+++ b/vendor/bundle/ruby/2.1.0/gems/sequel-4.9.0/lib/sequel/adapters/postgres.rb 2014-08-26 20:31:53.000000000 +0000