Skip to content

Instantly share code, notes, and snippets.

View mistadikay's full-sized avatar

Denis Koltsov mistadikay

View GitHub Profile
@mistadikay
mistadikay / npm-install.sh
Created October 17, 2018 12:35
Speedup node modules installation if cache exists on s3
#!/usr/bin/env bash
NPM_TARBALL=node_modules.tgz
NPM_MD5SUM_FILE=package-lock.md5sum
NPM_CACHE_DIR=${HOME}/.cache/YOUR_PROJECT/npmtarball
S3_DIR=s3://YOUR_BUCKET/YOUR_PROJECT
function shouldInstallFromCache() {
printf "\nChecking the cache\n"
[[ ! -e $NPM_CACHE_DIR ]] && mkdir -p $NPM_CACHE_DIR
@mistadikay
mistadikay / fix.sh
Created March 19, 2018 11:43
[gitkraken on Fedora]
sudo ln -s /usr/lib64/libcurl.so.4 /opt/gitkraken/libcurl-gnutls.so.4
beforeAll(() => browser.waitForExist('body'));
it('rendered on the page', () => {
// <script type="text/javascript">
// window.jsErrors = [];
// window.jsErrors.push('test');
// window.jsErrors = JSON.stringify(window.jsErrors);
// // window.onerror = function(e) {
// // window.jsErrors.push(e.message);
// // };
@mistadikay
mistadikay / keep_last_safari_tab_alive.applescript
Created August 7, 2017 20:54
Run this script on Cmd + W to prevent closing the last tab in Safari
tell application "Safari"
set numWin to count of tabs of window 1
if numWin > 1 then
close current tab of front window
end if
if numWin = 1 then
tell application "Safari" to activate
tell application "System Events"
keystroke "t" using command down
end tell

Keybase proof

I hereby claim:

  • I am mistadikay on github.
  • I am mistadikay (https://keybase.io/mistadikay) on keybase.
  • I have a public key ASASjiBOQ8Vqli8mQLZjHQsHGJkCi3gxATcdZt5QhthJJAo

To claim this, I am signing this object:

import Button from '#button';
import Button from '../../some-layer/button/';
import from '../../some-theme/button/styles.css';
import from '../../another-theme/button/styles.css';
// ...
preLoaders: [
{
test: /\.js$/,
loader: 'rebem-layers',
query: {
layers: [
// shared layers
require('core-components'),
require('theme-reset'),
/*
.
└── app/
└── somewhere.js
*/
// js from the last layer, styles from all previous layers
import Button from '#button';
// import Button from 'product-theme/button/index.js';
// import from 'theme-reset/styles.less';
// import from 'product-theme/styles.less';
/*
.
└── product-theme/
└── button/
├── index.js
└── styles.less
*/
// js from the last layer, styles from all previous layers
import Button from '#button';