Skip to content

Instantly share code, notes, and snippets.

Avatar
🍺

Kasper Mikiewicz Idered

🍺
View GitHub Profile
View index.tsx
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 Mar 9, 2018
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2018-03-09T21:16:36.757Z","extensionVersion":"v2.9.0"}
View keybase.md

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:

View app.jsx
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}} />
View .vimrc
" Cancel the compatibility with Vi.
set nocompatible
" .........................................................
" # Vundle
" .........................................................
filetype off
@Idered
Idered / Open With Sublime Text.bat
Created Aug 5, 2015
Add "Open with Sublime Text" command to file, folder and inside directory context menu.
View Open With Sublime Text.bat
@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 Aug 29, 2015
Adobe Lightroom 6 wrong exif read
View exif-reader.js
// 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 Jan 5, 2014
Remove first and last empty lines, remove useless indentation. Good for parsing HTML
View script.js
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 Dec 23, 2015
Editr Sample
View radio.css
/** %[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; }
@Idered
Idered / pclzip.lib.php
Last active Jul 21, 2016
Unzip file with php
View pclzip.lib.php
<?php
// --------------------------------------------------------------------------------
// PhpConcept Library - Zip Module 1.3
// --------------------------------------------------------------------------------
// License GNU/LGPL - Vincent Blavet - January 2003
// http://www.phpconcept.net
// --------------------------------------------------------------------------------
//
// Presentation :
// PclZip is a PHP library that manage ZIP archives.
You can’t perform that action at this time.