Skip to content

Instantly share code, notes, and snippets.

View edwintorok's full-sized avatar
💭
I may be slow to respond.

Török Edwin edwintorok

💭
I may be slow to respond.
View GitHub Profile
@edwintorok
edwintorok / crash1
Created September 6, 2016 15:28
koreader crash on book status
--------- beginning of /dev/log/system
D/BatteryService( 581): Sending ACTION_BATTERY_CHANGED.
D/STATUSBAR-IconMerger( 689): checkOverflow(870), More:false, Req:false Child:1
D/STATUSBAR-PhoneStatusBar( 689): mBrightnessEnablebySettings = true mBrightnessEnablebyBattery = true mBrightnessEnablebyDisableFlag = true mPmsBrightnessEnablebySettings = true
D/BatteryMeterView( 689): ACTION_BATTERY_CHANGED : level:44 status:3 health:2
D/STATUSBAR-IconMerger( 689): checkOverflow(870), More:false, Req:false Child:1
V/AlarmManager( 581): waitForAlarm result :12
V/AlarmManager( 581): trigger ELAPSED_REALTIME_WAKEUP or RTC_WAKEUP
E/Watchdog( 581): !@Sync 111
D/KeyguardClockWidgetService( 1067): onReceive action=android.intent.action.TIME_TICK
I/KOReader(17767): # opening file /mnt/sdcard/Books/Zotero/A Sampling Theory Primer, Nyquist sampling discrete-time/Sampling_ what nyquist didn't say, and what to do about it/Wescott, Tim.pdf
I/KOReader(17767): ffi.load libs/liblept.so.4
I/KOReader(17767): ffi.load libs/libk2pdfopt.so.2
I/KOReader(17767): # cache image|resources/icons/dogear.png||
I/KOReader(17767): # cache image|resources/icons/appbar.book.open.png||
I/KOReader(17767): # Loaded plugin calibrecompanion at plugins/calibrecompanion.koplugin
I/KOReader(17767): # Loaded plugin evernote at plugins/evernote.koplugin
I/KOReader(17767): # Loaded plugin kosync at plugins/kosync.koplugin
I/KOReader(17767): # Loaded plugin statistics at plugins/statistics.koplugin
I/KOReader(17767): # Loaded plugin zsync at plugins/zsync.koplugin
Script started on Sun 08 Jan 2017 02:58:15 PM EET
[edwin@bolt mobile]$ eliom-distillery -name ocsimobile -template os.pgocaml && cd ocsimobile && sed -i -e '/CREATE EXTENSION citext/d
' ocsimobile.sql && sed -i -e 's/citext/text/g' ocsimobile.sql
Destination directory "ocsimobile" doesn't exist. Create it? (YES/no) y
Generated ocsimobile/demo_react.eliom
Generated ocsimobile/mobile/www/img/logo.png
Generated ocsimobile/ocsimobile_tips.eliomi
Generated ocsimobile/ocsimobile_drawer.eliom
Generated ocsimobile/mobile/.chcpignore
Generated ocsimobile/Makefile.options

Keybase proof

I hereby claim:

  • I am edwintorok on github.
  • I am edwintorok (https://keybase.io/edwintorok) on keybase.
  • I have a public key whose fingerprint is B32F 9BE2 E22D 4615 ABD2 CE8E 814A 3A7A 06AA 1295

To claim this, I am signing this object:

open Sexplib
let reformat sexp = sexp
let vparens pp ppf = Fmt.pf ppf "@[<v1>(%a)@]" pp
let slist = Fmt.(list ~sep:sp)
let spair = Fmt.(pair ~sep:sp)
let canonicalize_set = List.sort_uniq (*Sexp.*)compare
let prologue =
{|
{-# language DeriveGeneric #-}
module Parser where
import Data.Csv
import qualified Data.Vector as V
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.Lazy.Char8 as BSL
import GHC.Generics
import Control.Monad
@edwintorok
edwintorok / codegen.ml
Last active August 23, 2020 20:42
ocaml code generator
let prologue =
{|
(* This code is automatically generated *)
let string_of_string x = x
|}
let epilogue =
{|
let print t = pp Format.std_formatter t
diff -rwu chase-lev-deque/deque.c chase-lev-deque-bugfix/deque.c
--- chase-lev-deque/deque.c 2020-08-25 20:29:46.964661118 +0100
+++ chase-lev-deque-bugfix/deque.c 2020-08-25 20:29:46.963661116 +0100
@@ -50,7 +50,7 @@
for(i=top; i < bottom; i++) {
atomic_store_explicit(&new_a->buffer[i % new_size], atomic_load_explicit(&a->buffer[i % size], memory_order_relaxed), memory_order_relaxed);
}
- atomic_store_explicit(&q->array, new_a, memory_order_relaxed);
+ atomic_store_explicit(&q->array, new_a, memory_order_release);
printf("resize\n");
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#if defined(__i386__) || defined(__x86_64__)
#include <cpuid.h>
#endif
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>