Skip to content

Instantly share code, notes, and snippets.

View nakedible's full-sized avatar

Nuutti Kotivuori nakedible

  • Nexi Digital Finland Oy
  • Helsinki, Finland
View GitHub Profile
create_delete_tree_aery/d1w1
time: [46.057 µs 46.674 µs 47.362 µs]
create_delete_tree_aery/d1w10
time: [51.946 µs 52.522 µs 53.157 µs]
create_delete_tree_aery/d1w100
time: [119.44 µs 120.58 µs 121.73 µs]
create_delete_tree_aery/d1w1000
time: [743.74 µs 746.27 µs 749.00 µs]
create_delete_tree_aery/d10w1
time: [54.153 µs 54.976 µs 55.903 µs]
@nakedible
nakedible / devcontainer.json
Created July 18, 2023 15:16
devcontainer.json for Bevy
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/rust
{
"name": "Rust",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/rust:1",
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
// "mounts": [
// {
SSLEngine on
SSLProtocol +TLSv1.2 +TLSv1.1 +TLSv1 -SSLv2 -SSLv3
SSLOptions +StdEnvVars +ExportCertData
SSLCipherSuite HIGH:!SSLv2:!ADH:!aNULL:!eNULL:!NULL
SSLHonorCipherOrder on
SSLCompression off
# 180 days HSTS
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
- PR #91: Clean up use case names: `xmlpos` and `standalone`
- Rename use case `xmlpos_unbranded` to `xmlpos`
- PR #94: Add a screen replacement feature (app_params.screen_replacements)
- Screen replacement, untested
- PR #87: Remove XMLPOS usecase variants
- Update screens
- Remove XMLPOS usecase variants
while read -r sha; do
if [ -n "$(git rev-list --merges ${sha}~1..${sha})" ]; then
if git show -s --pretty=format:'%s' ${sha} | grep -q 'Merge pull'; then
pr=$(git show -s --pretty=format:'%s' ${sha} | cut -d' ' -f4)
git --no-pager log --pretty=tformat:'- PR '"$pr"': %b' -n 1 ${sha}
else
git --no-pager log --pretty=tformat:'- %s' -n 1 ${sha}
fi
git --no-pager log --pretty=tformat:' - %s' ${sha}^..${sha}^2
else
* Merge commit
* Commit
* Another
* Yet
* Merge commit two
* One
* more
* Not a merge commit
* Last merge
* Foo
@nakedible
nakedible / gist:e8cad83a7967bb4bca26
Created May 12, 2014 18:16
go language parallelism problem
Problem:
- Process all lines in a file
- Output processed lines in the same order as the original lines
- Processing a line takes a variable amount of time
- Each line processing is independent so can be parallelized
- The input file is many times the size of the available memory
- The processing must be streaming, there can't be a sorting step at the end
Proposed solution:
#!/usr/bin/python
# Written by Nuutti Kotivuori <naked@iki.fi>
#
# This work is free. You can redistribute it and/or modify it under the
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
import sys, yaml, tarfile