Skip to content

Instantly share code, notes, and snippets.

View valscion's full-sized avatar

Vesa Laakso valscion

View GitHub Profile
@valscion
valscion / machine.js
Created September 24, 2019 12:28
Generated by XState Viz: https://xstate.js.org/viz
const handleRequestSuccess = assign({
results: (_ctx, event) => event.results
});
const handleHistoryPopState = assign({
results: (_ctx, event) => event.results
});
const searchStateMachine = Machine({
id: 'search',
@valscion
valscion / machine.js
Last active September 24, 2019 11:52
Generated by XState Viz: https://xstate.js.org/viz
const handleRequestSuccess = assign({
results: (_ctx, event) => event.results
});
const handleHistoryPopState = assign({
results: (_ctx, event) => event.results
});
const searchStateMachine = Machine({
id: 'search',
@valscion
valscion / machine.js
Last active October 8, 2019 11:35
Generated by XState Viz: https://xstate.js.org/viz
const handleRequestSuccess = assign({
results: (_ctx, event) => event.results
});
const handleHistoryPopState = assign({
results: (_ctx, event) => event.results
});
const searchFSM = Machine({
id: 'search',
@valscion
valscion / SketchSystems.spec
Last active October 8, 2019 11:36
Closed*
Closed*
report anomaly -> Opened
Opened
close -> Closed
Ilmoita muu tilanne*
Initial*
Asiakkaalle on vastattu toisessa keskustelussa -> Button
Tilaisuus on jo raportoitu toisessa keskustelussa -> Button
@valscion
valscion / SketchSystems.spec
Created September 10, 2018 08:56
Ilmoita muu tilanne
Ilmoita muu tilanne
Start*
option1 -> Saving
option2 -> Saving
option3 -> Saving
option4 -> Muu tilanne
Saving
success -> Success
failure -> Failed
Failed
@valscion
valscion / circleci-steps.yml
Created December 13, 2017 15:13
Depfu + Git LFS + CircleCI. MIT licensed
steps:
- checkout
- run: ssh git@github.com git-lfs-authenticate venuu/venuu.git download
- run:
name: Pull LFS files
command: |-
git lfs install
git lfs pull
- run:
name: Fix LFS files committed as regular binary files
@valscion
valscion / depfu-lfs
Last active November 28, 2017 12:15
Depfu + Git LFS. MIT licensed
#!/usr/bin/env bash
# MIT License
#
# Copyright (c) 2017 Vesa Laakso
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@valscion
valscion / app-concepts-auto_translate-callbacks-after_commit.rb
Last active April 28, 2021 22:15
Mobility + EasyTranslate. Replace dashes in file names with slashes
# frozen_string_literal: true
module AutoTranslate
module Callbacks
class AfterCommit
attr_reader :original_attribute_name, :translated_attribute_name
def initialize(original_attribute_name, translated_attribute_name)
@original_attribute_name = original_attribute_name
@translated_attribute_name = translated_attribute_name
@valscion
valscion / allegro.log
Created August 11, 2017 20:17
allegro freeze machine on start
stdio D file_stdio.c:109 file_stdio_fopen [ 0.00000] opening /Users/vesa/code/muut/allegro5/build/./demos/speed/speed.app/Contents/MacOS/allegro5.cfg r
MacOSX D system.m:134 osx_sys_init [ 0.00000] system driver initialised.
system I system.c:257 al_install_system [ 0.00000] Allegro version: 5.2.2
MacOSX D osxgl.m:1524 create_display_win [ 0.00029] Creating window sized 640x480
MacOSX I system.m:365 osx_get_num_video_adapters [ 0.00031] Detected 1 displays
MacOSX D osxgl.m:741 osx_set_opengl_pixelformat_attributes [ 0.00034] Using default colour depth 32
MacOSX D osxgl.m:788 osx_set_opengl_pixelformat_attributes [ 0.00035] Passing pixel format attribute ALLEGRO_SAMPLE_BUFFERS = 1
MacOSX D osxgl.m:788 osx_set_opengl_pixelformat_attributes [ 0.00035] Passing pixel format attribute ALLEGRO_SAMPLES = 4
MacOSX
@valscion
valscion / 1-sys-log.log
Created August 11, 2017 19:51
Allegro: App freeze on start, sometimes
default 22:37:22.199734 +0300 kernel [speed pid:1797 mux-aware] starting, non-mux-aware app count 0, switch-state 0 IG FBs 0 EG FBs 1:f power-state 0 3D busy HDA idle
default 22:37:22.199812 +0300 kernel [speed pid:1797 non-mux-aware] starting, non-mux-aware app count 1, switch-state 0 IG FBs 0 EG FBs 1:f power-state 0 3D busy HDA idle
default 22:37:22.287670 +0300 kernel NVDA(Graphics): Channel exception! Exception type = 0x45 Graphics Engine Error (GR Class Error)
default 22:37:22.287680 +0300 kernel NVDA(Graphics): Channel exception! Exception type = 0x45 Graphics Engine Error (GR Class Error)
default 22:37:22.287681 +0300 kernel NVDA: Channel Info: [19, 0x13, 0x12, 0x16e]
default 22:37:22.287682 +0300 kernel Channel Info: [19, 0x13, 0x12, 0x16e]
default 22:37:22.287684 +0300 kernel NVDA: Version Info: [com.apple.GeForce, 10.1.7, 0x7d780b0a, 18894120, 355.10.05.45f01, 1]
default 22:37:22.287685 +0300 kernel Version Info: [com.apple.GeForce, 10.1.7, 0x7d780b0a, 18894120, 355.10.05.45f01, 1]
default