Skip to content

Instantly share code, notes, and snippets.

View xylix's full-sized avatar

Kerkko Pelttari xylix

View GitHub Profile
@xylix
xylix / keybase.md
Last active November 23, 2016 10:14

Keybase proof

I hereby claim:

  • I am xylix on github.
  • I am xylix (https://keybase.io/xylix) on keybase.
  • I have a public key whose fingerprint is 9864 031D 44D2 F826 AF5A 3808 8DAB 65E3 A8CB E58C

To claim this, I am signing this object:

@xylix
xylix / index.html
Created November 10, 2016 14:23
Alpaca nested map test
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" href="https://code.cloudcms.com/alpaca/1.5.22/bootstrap/alpaca.min.css"/>
<link rel="stylesheet" href="index.css"/>
</html>
<body>
<div id="form"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
@xylix
xylix / rust_backtrace.log
Created February 23, 2020 08:05
sql get rows starting with `pattern` weird failure
488762c
thread 'api_tests::settings_list_get' panicked at 'This should unwrap: RecvError', aw-datastore/src/worker.rs:424:15
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/libunwind.rs:88
1: backtrace::backtrace::trace_unsynchronized
at /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.40/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:77
@xylix
xylix / rust_backtrace_2.log
Created February 23, 2020 19:03
backtrace for worker panic
thread 'api_tests::settings_list_get' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', aw-datastore/src/worker.rs:426:15
stack backtrace:
0: backtrace::backtrace::libunwind::trace
at /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/libunwind.rs:86
1: backtrace::backtrace::trace_unsynchronized
at /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/mod.rs:66
2: std::sys_common::backtrace::_print_fmt
at src/libstd/sys_common/backtrace.rs:78
3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
at src/libstd/sys_common/backtrace.rs:59
@xylix
xylix / errorlog.log
Created March 15, 2020 17:30
MacOS system error log
error 19:30:12.883436+0200 tccd Failed to copy signing info for 15059, responsible for file:///Applications/ActivityWatch.app/Contents/MacOS/aw-qt: #-67062: Error Domain=NSOSStatusErrorDomain Code=-67062 "(null)"
error 19:30:12.899487+0200 tccd cannot open file at line 43353 of [378230ae7f]
error 19:30:12.899530+0200 tccd os_unix.c:43353: (2) open(/var/db/DetachedSignatures) - No such file or directory
error 19:30:12.941205+0200 runningboardd Launchd failed to get information for pid 15088, failed with error Error Domain=NSPOSIXErrorDomain Code=113 "Unknown error: 113"
error 19:30:13.364804+0200 System Events ERROR: Failed to create a desc with expected type (is 'long' should be 'comp')
error 19:30:13.500082+0200 taskgated cannot open file at line 43353 of [378230ae7f]
error 19:30:13.500129+0200 taskgated os_unix.c:43353: (2) open(/var/db/DetachedSignatures) - No such file or directory
error 19:30:13.509382+0200 taskgated cannot open file at line 43353 of [378230ae7f]
error 19:30:13.509438+0200 taskga
Traceback (most recent call last):
File "/home/xylix/Code/activitywatch/venv/bin/pyinstaller", line 10, in <module>
sys.exit(run())
File "/home/xylix/Code/activitywatch/venv/lib/python3.8/site-packages/PyInstaller/__main__.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "/home/xylix/Code/activitywatch/venv/lib/python3.8/site-packages/PyInstaller/__main__.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/home/xylix/Code/activitywatch/venv/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 844, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "/home/xylix/Code/activitywatch/venv/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 791, in build
@xylix
xylix / alias.fish
Created March 30, 2020 12:06
fishalias
# Defined in /usr/local/Cellar/fish/3.1.0_1/share/fish/functions/alias.fish @ line 1
function alias --description 'Creates a function wrapping a command'
set -l options 'h/help' 's/save'
argparse -n alias --max-args=2 $options -- $argv
or return
if set -q _flag_help
__fish_print_help alias
return 0
end
Total time (s) | Calls | Avg time (s) | Median time (s) | Stdev (s) | Stdev/avg time % | Keyword name
68.37 | 83 | 0.824 | 0.578 | 0.593 | 71.97 | Browser.New Page
29.389 | 1 | 29.389 | 29.389 | 0.0 | 0.0 | Browser.Highlight Element
27.799 | 31 | 0.897 | 0.973 | 0.594 | 66.22 | Browser.New Browser
17.465 | 15 | 1.164 | 1.212 | 0.449 | 38.57 | keywords.Open Browser To No Page
10.023 | 2 | 5.011 | 5.011 | 5.002 | 99.82 | Browser.Close Page
9.704 | 39 | 0.249 | 0.122 | 0.295 | 118.47 | BuiltIn.Run Keyword And Expect Error
9.51 | 5 | 1.902 | 1.575 | 1.257 | 66.09 | keywords.Open Browser To Login Page
6.102 | 4 | 1.526 | 1.115 | 1.075 | 70.45 | Open
@xylix
xylix / hy-test-failures
Created August 1, 2020 14:16
Hy test failures
======================================================================================================================================= FAILURES =======================================================================================================================================
__________________________________________________________________________________________________________________________ test_bin_hy_circular_macro_require __________________________________________________________________________________________________________________________
def test_bin_hy_circular_macro_require():
"""Confirm that macros can require themselves during expansion and when
run from the command line."""
# First, with no bytecode
test_file = "tests/resources/bin/circular_macro_require.hy"
rm(cache_from_source(test_file))
@xylix
xylix / InputEventHandling.java
Created September 1, 2020 13:23
JavaFX keyboard input handling
scene.setOnKeyPressed(event -> {
if (event.getCode() == KeyCode.LEFT) {
System.out.println("Painettiin nuolta vasemmalle")
} else if (event.getCode() == KeyCode.RIGHT) {
System.out.println("Painettiin nuolta oikealle")
} else {
System.out.println("Käsittelemätön näppäin")
}
});