Skip to content

Instantly share code, notes, and snippets.

View sanusart's full-sized avatar

Sasha Khamkov sanusart

View GitHub Profile
@sanusart
sanusart / etszr.sql
Last active March 26, 2019 21:07
sql test #sql #temp #test #bug248
DECLARE
message varchar2(20):= 'Hello, World!';
BEGIN
dbms_output.put_line(message);
END;
/
@sanusart
sanusart / FiltersMenu.js
Last active March 24, 2019 05:09
FiltersMenu #temp
import React, { Component } from 'react';
import styled from 'styled-components/macro';
import GroupedBy from 'components/pages/Run/FiltersMenu/GroupedBy';
import { SegmentedButton, TextInput } from 'app-components';
import { ReactComponent as SuccessIcon } from 'assets/check.svg';
import { ReactComponent as ArrowRightIcon } from 'assets/arror_grey_toRight.svg';
const HEADER_HEIGHT = 65;
console.log('sa');
@sanusart
sanusart / ypaht.js
Created February 25, 2019 17:46
content editable input #reactjs #react-dropdown-select
import React from 'react';
import styled from '@emotion/styled';
import { valueExistInSelected } from '../util';
const handlePlaceHolder = (props, state) => {
const noValues = state.values && state.values.length === 0;
const hasValues = state.values && state.values.length > 0;
if (hasValues && props.addPlaceholder && props.searchable) {
return props.addPlaceholder;
@sanusart
sanusart / Monokai Sublime Text 3 custom.icls
Last active October 11, 2018 18:36
Webstorm "monokai sublime text 3" custom theme #theme #webstorm
<scheme name="Monokai Sublime Text 3" version="142" parent_scheme="Default">
<option name="FONT_SCALE" value="1.0" />
<metaInfo>
<property name="created">2018-09-25T20:33:45</property>
<property name="ide">WebStorm</property>
<property name="ideVersion">2018.3.0.0</property>
<property name="modified">2018-09-25T20:34:03</property>
<property name="originalScheme">Monokai Sublime Text 3</property>
</metaInfo>
<option name="LINE_SPACING" value="1.0" />
@sanusart
sanusart / file 2.txt
Last active October 2, 2018 17:39
Test files drag and drop
Hello, I am some test 22
@sanusart
sanusart / export.js
Created June 7, 2018 08:06
amCharts3-react export by ref #rafael #react #amcharts
handleClick = () => {
const chart = this.chart.state.chart;
chart.export.capture({}, () => {
chart.export.toJPG({}, (data) => {
chart.export.download(data, chart.export.defaults.formats.JPG.mimeType, 'amCharts.JPG');
});
});
}
@sanusart
sanusart / anchor.directive.ts
Last active March 19, 2018 21:56
Angular electron/browser open link directive #angular #angular1 #angular4 #angular5 #directive #electron
import { Directive, HostListener, Input } from '@angular/core';
import { ElectronService } from 'ngx-electron';
/**
* @Usage: <a external href="https://www.gistoapp.com">link</a>
* @dependencies: ngx-electron
*/
@Directive({
selector: '[external]'
@sanusart
sanusart / coppyToClipboard.directive.ts
Last active March 19, 2018 21:48
Angular copy to clipboard directive #angular #angular4 #angular5 #directive #clipboard
import { Directive, HostListener, Input } from '@angular/core';
/**
* @Usage: <a CopyToClipBoard="I am to be copied">Copy to Clipboard</a>
*/
@Directive({
selector: '[CopyToClipBoard]'
})
export class CopyToClipBoardDirective {
@sanusart
sanusart / sortBy.pipe.ts
Last active January 12, 2018 19:06
Angular sortBy pipe #tag #angular #angular4 #lodash #fp #pipe #tag1
import { Pipe, PipeTransform } from '@angular/core';
import { sortBy, reverse, flow, identity } from 'lodash/fp';
@Pipe({ name: 'sortBy' })
export class SortByPipe implements PipeTransform {
transform(list, field, direction = 'DESC') {
return flow([
sortBy([field]),