Skip to content

Instantly share code, notes, and snippets.

View iliaznk's full-sized avatar
🎹
hitting some keys

Ilya Zuenok iliaznk

🎹
hitting some keys
View GitHub Profile
@iliaznk
iliaznk / redux-module-patterns.md
Created April 13, 2020 09:15 — forked from heygrady/redux-module-patterns.md
Redux module patterns: app state, view state and regional state

Redux module patterns

app state, view state and regional state

separating components and containers

and code-splitting reducers


@iliaznk
iliaznk / web-servers.md
Created January 18, 2020 08:28 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@iliaznk
iliaznk / Genomics_A_Programmers_Guide.md
Created May 20, 2019 10:13 — forked from andy-thomason/Genomics_A_Programmers_Guide.md
Genomics a programmers introduction

Genomics - A programmer's guide.

Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.

https://www.genomicsplc.com

# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/
# core
brew install coreutils
# key commands
brew install binutils
brew install diffutils
brew install ed --default-names
brew install findutils --with-default-names

Keybase proof

I hereby claim:

  • I am iliaznk on github.
  • I am iliaznk (https://keybase.io/iliaznk) on keybase.
  • I have a public key ASBMFheEvzqU1x6wGFVd4vWG6PfRic3fEcfppLsu-BE2zQo

To claim this, I am signing this object:

function saveSelection() {
if (window.getSelection) {
var sel = window.getSelection();
if (sel.getRangeAt && sel.rangeCount) {
return sel.getRangeAt(0);
}
} else if (document.selection && document.selection.createRange) {
return document.selection.createRange();
}
return null;
@iliaznk
iliaznk / plaintext-contenteditable.css
Created March 4, 2018 08:11 — forked from Schniz/plaintext-contenteditable.css
Plain-Text ContentEditable div for React.js
.comPlainTextContentEditable {
-webkit-user-modify: read-write-plaintext-only;
}
.comPlainTextContentEditable--has-placeholder::before {
content: attr(placeholder);
opacity: 0.5;
color: inherit;
cursor: text;
}
@iliaznk
iliaznk / frame-based-animation.scss
Created March 2, 2018 06:21 — forked from robweychert/frame-based-animation.md
A simple Sass function for frame-based CSS animation
// If you have experience with animation in other media, CSS
// animation’s percentage-based keyframe syntax can feel pretty
// alien, especially if you want to be very precise about timing.
// This Sass function lets you forget about percentages and
// express keyframes in terms of actual frames:
@function f($frame) {
@return percentage( $frame / $totalframes )
}
@iliaznk
iliaznk / form-fields.jsx
Created November 7, 2017 07:44 — forked from joshuaslate/form-fields.jsx
A quick rundown of working with Redux-Form 6+
import React, { Component } from 'react';
import { Field, reduxForm } from 'redux-form';
import moment from 'moment';
import DatePicker from 'react-datepicker';
import ReactQuill from 'react-quill';
import MaskedInput from 'react-maskedinput';
export const renderField = (field) => (
<div>
<input {...field.input} type={field.type} placeholder={field.placeholder} className="form-control" />
@iliaznk
iliaznk / swipe.js
Created January 10, 2017 06:49 — forked from SleepWalker/swipe.js
A simple swipe detection on vanilla js
var touchstartX = 0;
var touchstartY = 0;
var touchendX = 0;
var touchendY = 0;
var gesuredZone = document.getElementById('gesuredZone');
gesuredZone.addEventListener('touchstart', function(event) {
touchstartX = event.screenX;
touchstartY = event.screenY;