Skip to content

Instantly share code, notes, and snippets.

View gangstaJS's full-sized avatar

Oleksandr Shapovalenko gangstaJS

View GitHub Profile
@gangstaJS
gangstaJS / install.sh
Created October 11, 2024 16:28 — forked from NegatioN/install.sh
Installing Canon Printers Ubuntu
# Origin http://ubuntuhandbook.org/index.php/2020/05/canon-printer-scangear-mp-ubuntu-20-04/
# Ubuntu
sudo apt install printer-driver-gutenprint
sudo add-apt-repository ppa:thierry-f/fork-michael-gruz
sudo apt install scangearmp2
sudo apt install scangearmp-mp495series
# Arch / Manjaro
import { setRequestStatus, Status } from 'componentversions/organizer/modules/ui-helpers';
import {useSelector, useDispatch} from 'react-redux';
const Screen = () => {
const diapatch = useDispatch();
const {asyncStatuses} = useSelector((state) => ({dialogs: state.uiHelpers.asyncStatuses}));
return <div>
import { dialogToggle } from 'componentversions/organizer/modules/ui-helpers';
import {useSelector, useDispatch} from 'react-redux';
const Screen = () => {
const diapatch = useDispatch();
const {dialogs} = useSelector((state) => ({dialogs: state.uiHelpers.dialogs}));
return <div>
@gangstaJS
gangstaJS / config.js
Created March 29, 2020 18:34 — forked from chodorowicz/config.js
react-storybook samples
/**
* dynamically loading all stories with .stories.js extension
*/
import { configure } from '@kadira/storybook';
require('es6-promise').polyfill();
import 'babel-polyfill';
const stories = require.context('../app/js/components', true, /.stories.js$/);
function loadStories() {

Create subscriotion

POST /subs/{id}/orgs

Body

{
  "id": 10,
 "name: "hello"
import {applyMiddleware, compose, createStore} from 'redux';
import {routerMiddleware} from 'react-router-redux';
import thunk from 'redux-thunk';
import {createBrowserHistory} from 'history';
import rootReducer from './reducers';
export const history = createBrowserHistory({
basename: '/app',
});
import React, {Component} from 'react';
import {connect, ConnectedProps} from 'react-redux';
interface State {}
type Props = ConnectedProps<typeof connector>;
class Hello extends Component<Props, State> {
// ...
}
<!DOCTYPE html>
<html lang="en" style="padding: 0;margin: 0;">
<head style="padding: 0;margin: 0;">
<title style="padding: 0;margin: 0;">Anomalies email template</title>
<link rel="stylesheet" href="/styles.css" style="padding: 0;margin: 0;">
<style style="padding: 0;margin: 0;">
* {
padding: 0;
margin: 0; }
@gangstaJS
gangstaJS / tags.md
Last active November 15, 2019 10:50
tags.md

Get tags

GET /tags?type=farm

[
  {
    id: 1,
    name: 'My Cool tag for NRx',
 }

Система сокрытия фич на основе URL параметров.

К примеру чтобы скрыть компонент пишим следующий код:

import FeaturesToggle from 'containers/features-toggl.js';

class TestComponent extends Component {
  
  render() {