Skip to content

Instantly share code, notes, and snippets.

View olegchursin's full-sized avatar
🐬
Common sense isn't very common.

Oleg Chursin olegchursin

🐬
Common sense isn't very common.
View GitHub Profile
@olegchursin
olegchursin / contact.css
Created November 10, 2015 15:41 — forked from jongrover/contact.css
Front-end / Back-end Validated Email Mailer Form Submission Solution using HTML5, PHP5, JavaScript, and jQuery
input.error, textarea.error {
border: 1px solid red;
}
span.error {
display: none;
color: red;
}
@olegchursin
olegchursin / .gitignore
Created December 15, 2015 22:25 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@olegchursin
olegchursin / Readme.md
Created February 18, 2018 03:39 — forked from mxstbr/Readme.md
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
@olegchursin
olegchursin / Readme.md
Created February 18, 2018 03:39 — forked from mxstbr/Readme.md
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
@olegchursin
olegchursin / StickyFooter.md
Last active September 12, 2018 07:05
Sticky footer

Sticky Footer

Flexbox way

The HTML

<body class="Site">
  <header>…</header>
  <main class="Site-content">…</main>
  <footer>…</footer>
@olegchursin
olegchursin / settings.json
Created October 27, 2018 22:32
Sample settings.json for VSCode
{
"workbench.colorCustomizations": {
"titleBar.activeForeground": "#000",
"titleBar.inactiveForeground": "#000000CC",
"titleBar.activeBackground": "#17FFFF",
"titleBar.inactiveBackground": "#17FFFF"
}
}
#header {
font-family: Roboto;
background-color: #252429;
color: #ff59d8;
border-color: #f513f5;
}
#user-tools a {
color: #4fffff;
}
@olegchursin
olegchursin / example.jsx
Created May 1, 2019 05:48 — forked from bvaughn/LICENSE.md
Advanced example for manually managing subscriptions in an async-safe way using hooks
import React, { useMemo } from "react";
import useSubscription from "./useSubscription";
// In this example, "source" is an event dispatcher (e.g. an HTMLInputElement)
// but it could be anything that emits an event and has a readable current value.
function Example({ source }) {
// In order to avoid removing and re-adding subscriptions each time this hook is called,
// the parameters passed to this hook should be memoized.
const subscription = useMemo(
() => ({
@olegchursin
olegchursin / tslint.json
Created July 10, 2019 14:07
Sample tslint.json config
{
"rulesDirectory": ["node_modules/codelyzer"],
"rules": {
"arrow-return-shorthand": true,
"callable-types": true,
"class-name": true,
"comment-format": [true, "check-space"],
"curly": true,
"eofline": true,
"forin": true,
@olegchursin
olegchursin / vscode-settings.json
Last active September 6, 2019 16:40
VS Code settings.json example.
{
"workbench.colorCustomizations": {
"activityBar.background": "#050d14",
"activityBar.foreground": "#e7e7e7",
"activityBar.inactiveForeground": "#e7e7e799",
"activityBarBadge.background": "#90cf10",
"activityBarBadge.foreground": "#15202b",
"titleBar.activeBackground": "#cd108f",
"titleBar.inactiveBackground": "#cd108f99",
"titleBar.activeForeground": "#e7e7e7",