Skip to content

Instantly share code, notes, and snippets.

View ORBAT's full-sized avatar

Tom Eklöf ORBAT

  • Helsinki, Finland
View GitHub Profile
@ORBAT
ORBAT / steam-1716740.log
Created October 2, 2023 17:10
Starfield log
This file has been truncated, but you can view the full file.
======================
Proton: 1696017005 experimental-8.0-20230929b
SteamGameId: 1716740
Command: ['/home/deck/.local/share/Steam/steamapps/common/Starfield/Starfield.exe']
Options: {'forcelgadd'}
depot: 0.20230905.59202
pressure-vessel: 0.20230905.0 scout
scripts: 0.20230905.0
sniper: 0.20230905.59202 sniper 0.20230905.59202
Kernel: Linux 6.1.52-valve2-1-neptune-61 #1 SMP PREEMPT_DYNAMIC Fri, 15 Sep 2023 19:47:15 +0000 x86_64
@ORBAT
ORBAT / errors_test.go
Last active January 14, 2021 23:09
Named string error benchmark
package errstr
import (
"errors"
"testing"
)
type ErrString string
func (es ErrString) Error() string {

AGGRESSIIVI

Suomen kielen vanhojen modusten rinnalle on puhekielessä vakiintunut aggressiivi. Se taipuu persoonissa ja luvuissa ja kaikissa tempuksissa. Aggressiivin tunnus on toistaiseksi hyvin vaikeasti mihinkään sanaluokkaan määriteltävissä oleva VITTU.

Vittu ei koskaan esiinny yksin, se edustaa siis eräänlaista pohjarakennetta tai osamorfeemia.

@ORBAT
ORBAT / ent_bfs_api.go
Created December 9, 2020 18:08
Sketch of graph search API for ent
// Find all the supervisors (and their supervisors,
// and their supervisors and so on) of someUser
// who work in billing.
//
// someUser is the base case of WITH RECURSIVE
someUser.SearchSupervisors().
Where(user.OrganizationalUnit("billing")).
// no duplicates in the result (UNION ALL) and the
// search will terminate even if there are cycles
// in the graph
@ORBAT
ORBAT / conservatism considered harmful.md
Last active April 12, 2024 18:03
Studies about conservatism they don't want you to know about

In the present research (N = 675), we focus on the relationship between the dark side of human personality and political orientation and extremism, respectively, in the course of a presidential election where the two candidates represent either left-wing or right-wing political policies. Narcissism, Machiavellianism, psychopathy, and everyday sadism were associated with right-wing political orientation, whereas narcissism and psychopathy were associated with political extremism. Moreover, the relationships between personality and right-wing political orientation and extremism, respectively, were relatively independent from each other.

We found eleven significant corr

@ORBAT
ORBAT / uint64_to_bytes.go
Created March 26, 2020 10:27
Unsafe fuckery to turn uint64s into slices
package main
import (
"fmt"
"unsafe"
)
// Uint64ToBytes converts n to an 8-element byte slice. The order of the elements (i.e. whether the
// lowest byte is first or last) is dependent on hardware, but most modern CPUs are little-endian
// and have the lowest byte first (https://en.wikipedia.org/wiki/Endianness)
@ORBAT
ORBAT / counter_server.go
Last active May 30, 2023 00:25
An example of a Go HTTP server that serves an incrementing counter value
// run this with
// go run counter_server.go
// And then in a new terminal window run
// curl http://localhost:43210
package main
import (
"fmt"
"net/http"
"sync/atomic"
@ORBAT
ORBAT / ponyc_crash.log
Created August 20, 2019 13:23
ponyc crash
Building ../../values -> /Users/teklof/Documents/Programming/pony/ponetic/values
src/libponyc/type/reify.c:25: reify_typeparamref: Assertion `ref_def != NULL` failed.
Backtrace:
0 ponyc 0x0000000109f119c6 ponyint_assert_fail + 146
1 ponyc 0x0000000109ed40e3 reify_one + 333
2 ponyc 0x0000000109ed3fe4 reify_one + 78
3 ponyc 0x0000000109ed3fe4 reify_one + 78
4 ponyc 0x0000000109ed3fe4 reify_one + 78
5 ponyc 0x0000000109ed3fe4 reify_one + 78
@ORBAT
ORBAT / sVim.rc
Last active September 19, 2019 13:25
sVimrc
map "d" scrollPageDown
map "shift+d" scrollPageUp
map "g shift+g" scrollToBottom
unmap "g n"
map "g f" gotoNextPage
unmap "g p"
map "g shift+f" gotoPrevPage
map "€" scrollToRight
map "f" createTabbedHint
@ORBAT
ORBAT / sVim.css
Created June 11, 2019 17:20
sVimcss
@-webkit-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
#sVim-command {