Skip to content

Instantly share code, notes, and snippets.

View NeXTs's full-sized avatar

Denis NeXTs

  • Odessa, Ukraine
View GitHub Profile
NeXTs / gist:487f3278ac48728d317a1557f6c63335
Created March 27, 2018 10:52
Thinnest JS RGB(a) string parser
View gist:487f3278ac48728d317a1557f6c63335
export const parseRGBa = palette => {
palette = palette.replace(/[^0-9.,]/g, '').split(',').map(Number)
if(palette.length == 3) palette.push(1) // add alpha if missed
return palette
NeXTs / gist:a1f9549a1768774eb12e
Created December 15, 2015 21:47
Devtools separate window
View gist:a1f9549a1768774eb12e
import React from 'react';
import { render } from 'react-dom';
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';
* Puts Redux DevTools into a separate window.
* Based on
export default function createDevToolsWindow(store) {
// Give it a name so it reuses the same window
NeXTs / goto-sublime
Created October 29, 2015 14:18 — forked from kendellfab/goto-sublime
Add mouse click `goto definition` in sublime text 3.
View goto-sublime
Linux - create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User
Mac - create "Default (OSX).sublime-mousemap" in ~/Library/Application Support/Sublime Text 3/Packages/User
Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
View Get human address from Yandex Maps v2.0 geoObject "AddressDetails"
function getHumanAddress(geoObject){
var declaration = {
'CountryName': 'country',
'AdministrativeAreaName': 'area',
'SubAdministrativeAreaName': 'subarea',
'LocalityName': 'city',
'DependentLocalityName': 'subcity',
'ThoroughfareName': 'street',
'PremiseNumber': 'house'