Skip to content

Instantly share code, notes, and snippets.

a="jakas";
b="inna";
@szagi3891
szagi3891 / mobx-forms.ts
Last active September 27, 2018 18:42
Mobx forms
type InType<T> = {
readonly [P in keyof T]: T[P] | FormValue<any, T[P]>;
};
export class FieldsGroupState<T> {
private fields: InType<T>;
constructor(fields: InType<T>) {
this.fields = fields;
}
//Action - typ unia, zawierają się w nim wszystkie akcje
//StateTodolist - stan modułu todolisty
//StateApp - stan aplikacji
//todolist.js
export const getOfAction(actionName: string) => ((action: Action, state: StateTodolist): StateTodolist | null) => {
//na te akcje ten reducer cokolwiek robi
@szagi3891
szagi3891 / gist:f36f3fb513716b102bc9
Last active January 12, 2016 08:37
Bracket - plugins
brackets-jshints
Eclipse Theme Light
Exclude Folders
Rust IDE
{
"themes.theme": "brackets-eclipse-theme",
"jslint.enable": false,
"jshint.options": {
"unused": true,
"undef": true,
"nonew": true,
"esnext": true,
"evil": true,
"eqeqeq": true,
@szagi3891
szagi3891 / rs
Created December 22, 2015 21:01
podnoszenie wątków
use std::sync::mpsc::{channel, Sender};
use std::thread;
use std::time::Duration;
struct watch {
name : String,
chan: Sender<String>,
}