Skip to content

Instantly share code, notes, and snippets.

@aliaksandr-master
aliaksandr-master / translate.js
Created September 7, 2016 13:01
tiny translate script
'use strict';
let translations = {};
const PLACEHOLDER_EXP = /\{%\s*([^\s%]*)\s*%}/g;
const translate = (phrase, params = {}) => {
let translation;
if (!translations.hasOwnProperty(phrase)) {
@aliaksandr-master
aliaksandr-master / redux-router-v4-history-connector.js
Last active December 1, 2016 11:50
Connect ReactRouterV4 to Redux
import React, { Component, PropTypes } from 'react';
import { BASE_URL } from '../config';
import createBrowserHistory from 'history/createBrowserHistory';
import cloneDeep from 'lodash/cloneDeep';
import once from 'lodash/once';
import StaticRouter from 'react-router/StaticRouter';
const history = createBrowserHistory({
@aliaksandr-master
aliaksandr-master / connectUi.js
Last active December 2, 2016 11:33
ConnectUI
'use strict';
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import compose from 'recompose/compose';
import reduce from 'lodash/reduce';
import identity from 'lodash/identity';
import kebabCase from 'lodash/kebabCase';
const MOUNT = 'ui.MOUNT';
import { showSystemHiddenError } from './log';
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import compose from 'recompose/compose';
import reduce from 'lodash/reduce';
import { UI_ACTION_PREFIX, global } from './action';
import isFunction from 'lodash/isFunction';
#full update
apt-get install -f && apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get autoclean -y && apt-get autoremove -y
#basic
apt-get install -y gksu unrar cpufrequtils cputool hardinfo partitionmanager guake xubuntu-restricted-extras apt-transport-https ca-certificates curl software-properties-common
# firmware-linux firmware-linux-free firmware-linux-nonfree unrar
#media & office
apt-get install -y variety vlc vlc-* ttf-* audacity libreoffice libreoffice-l10n-ru shutter filezilla gimp ntp florence gedit
apt-get install ansible
https://galaxy.ansible.com/
http://docs.ansible.com/
#
# OS:
# - Xubuntu 23.04
#
# Hardware:
# - INTEL
# - NVIDIA
#
# THEMES:
# BaZik https://www.xfce-look.org/p/1394325/ (Blue, Orange)