Skip to content

Instantly share code, notes, and snippets.

View Idered's full-sized avatar
📸
Working on chalk.ist

Kasper Mikiewicz Idered

📸
Working on chalk.ist
View GitHub Profile
<template>
<slot :env="env" />
</template>
<script setup lang="ts">
const env = computed(() =>
Object.entries(import.meta.env).reduce(
(acc, [key, value]) => ({
...acc,
[key]: value,
import React from 'react'
import {nodes} from '@behavior-tree/core'
import {DevTools, createTreeStore, useTree} from '@behavior-tree/react'
const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))
const initialState = {
isLoggedIn: false,
isLoading: false,
profile: null,
@Idered
Idered / cloudSettings
Created March 9, 2018 21:16
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-03-09T21:16:36.757Z","extensionVersion":"v2.9.0"}

Keybase proof

I hereby claim:

  • I am idered on github.
  • I am idered (https://keybase.io/idered) on keybase.
  • I have a public key ASCbNn3_KiyKdVe83XCfCXN4-m0YBMPWCIHUloQeFpit_go

To claim this, I am signing this object:

import {app} from '../helpers'
import MessageList from './message-list'
import Messages from '../mixins/messages'
export default () => {
app({
mixins: [Messages],
view: (state, actions) =>
<div>
<MessageList compose={{state, actions}} />
@Idered
Idered / .vimrc
Created December 15, 2016 12:30
vimrc
" Cancel the compatibility with Vi.
set nocompatible
" .........................................................
" # Vundle
" .........................................................
filetype off
@Idered
Idered / Open With Sublime Text.bat
Created August 5, 2015 20:25
Add "Open with Sublime Text" command to file, folder and inside directory context menu.
@echo off
SET STPATH=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\sublime" /t REG_SZ /v "" /d "Open with Sublime Text" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\sublime" /t REG_EXPAND_SZ /v "Icon" /d "%STPATH%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\sublime\command" /t REG_SZ /v "" /d "%STPATH% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\sublime" /t REG_SZ /v "" /d "Open with Sublime Text" /f
@Idered
Idered / exif-reader.js
Last active August 29, 2015 14:19
Adobe Lightroom 6 wrong exif read
// This is part of exif reader which throws error
if (oFile.getLongAt(iTIFFOffset+4, bBigEnd) != 0x00000008) {
if (bDebug) console.log("Not valid TIFF data! (First offset not 8)", oFile.getShortAt(iTIFFOffset+4, bBigEnd));
return false;
}
@Idered
Idered / script.js
Created January 5, 2014 04:41
Remove first and last empty lines, remove useless indentation. Good for parsing HTML
var str = '\n\n\n Multiline text\n with indentation\n damn.\n\n\n';
// remove first and last empty lines
str = str.replace(/^[\r\n]+|[\n\r]+$/gi, '');
var indentTab = str.match(/\t*/) != '',
indentSize = indentTab ? 1 : str.match(/\s*/)[0].length,
regex = new RegExp('^(?:' + (indentTab ? '\\t' : ' {' + indentSize + '}') + ')', 'mg');
// Remove indent
@Idered
Idered / radio.css
Last active December 23, 2015 21:59
Editr Sample
/** %[Object] Radio buttons */
/*------------------------------------*/
@-webkit-keyframes pulse {
0% { width: .7em; height: .7em; margin: .4em; }
50% { width: 1.1em; height: 1.1em; margin: .2em; }
100% { width: .9em; height: .9em; margin: .3em; }
}
@-moz-keyframes pulse {
0% { width: .7em; height: .7em; margin: .4em; }