Skip to content

Instantly share code, notes, and snippets.

View var-bin's full-sized avatar
🤙
Preprocessors do not output bad code. Bad developers do.

Vitalii Rybka var-bin

🤙
Preprocessors do not output bad code. Bad developers do.
View GitHub Profile
{
"presets": [
[
"env",
{
"targets": {
"browsers": [
"last 2 versions",
"safari 7"
]
const homeAbout = {
name: "home.about",
url: "/about",
component: "homeAboutComponent",
lazyLoad: ($transition$) => {
const $ocLazyLoad = $transition$.injector().get("$ocLazyLoad");
return require.ensure([], () => {
// load whole module
let module = require("./about/about.module");
const homeIndex = {
name: "home",
url: "/home",
component: "homeComponent",
lazyLoad: ($transition$) => {
const $ocLazyLoad = $transition$.injector().get("$ocLazyLoad");
return require.ensure([], () => {
// load whole module
const module = require("./index/index.module");
@var-bin
var-bin / Preferences.sublime-settings
Last active July 1, 2017 12:04
Sublime Text User Settings
{
"color_scheme": "Packages/Predawn/predawn.tmTheme",
"copy_with_empty_selection": false,
"default_line_ending": "unix",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_size": 22,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages": [
@var-bin
var-bin / git.md
Last active April 25, 2017 07:58
Git Trobleshooting Stuff

fatal: refusing to merge unrelated histories

git merge --allow-unrelated-histories origin/<branch-name>

or

git pull origin <branch-name> --allow-unrelated-histories
@var-bin
var-bin / aliases.sh
Last active March 9, 2017 18:31
User specific aliases and functions. Repository https://github.com/var-bin/terminalForCoder__WSD
alias gst='git status'
alias gf='git fetch'
alias gm='git merge'
alias gd='git diff'
alias gb='git branch'
alias gbm='git branch --merged'
alias gcm='git commit -m'
alias gp='git push origin'
alias gbd='git branch -D'
alias gshorth='git log -p -2'
@var-bin
var-bin / clone_vendors.sh
Last active March 9, 2017 18:33
Clone vendors repositories to ./core/vendors. Repository https://github.com/var-bin/terminalForCoder__WSD
#!/bin/bash
# clone vendors repositories to ./core/vendors
REPO_NAME="terminalForCoder__WSD"
PATH_TO_CORE="${HOME}/${REPO_NAME}/bash/core"
PATH_TO_VENDORS_REPO="${HOME}/${REPO_NAME}/vendors"
# array with repositories
repositories=( "https://github.com/larscmagnusson/CSS3MultiColumn.git" "https://github.com/tc39/test262.git" "https://github.com/postcss/postcss" "https://github.com/webpack/webpack" "https://github.com/var-bin/spriteFactory.git" "https://github.com/var-bin/backbone-training.git" "https://github.com/var-bin/flex-grid-framework.git" "https://github.com/var-bin/BrandButtons.git" "https://github.com/var-bin/less-easings.git" )
i=0 # start el
@var-bin
var-bin / up_repo.sh
Last active March 9, 2017 18:35
Check repositories in core/vendor. Repository https://github.com/var-bin/terminalForCoder__WSD
#!/bin/bash
# up_repo.sh - check repositories in core/vendor
# find all directories that included .git
# If any repo hasn't switched on master branch
# than git checkout master && git branch && git pull
# else git branch && git pull
# get list of repositories
findRepo() {
@var-bin
var-bin / clean_dist.sh
Last active March 9, 2017 19:28
clean_dist.sh - clean dist for all themes or current theme. Repository https://github.com/var-bin/terminalForCoder__WSD
#!/bin/bash
# clean_dist.sh - clean dist for current theme
# ./clean_dist.sh - clean all directories with dists
# ./clean_dist.sh <theme> - clean <theme> dist
cleanDist() {
theme="$1"
DIST_NAME="_dist"
@var-bin
var-bin / fast_diff_v2.sh
Last active March 9, 2017 19:28
Create diff for current branch and put it in the file. Use Jira API to add diff to task. Repository https://github.com/var-bin/terminalForCoder__WSD
#!/bin/bash
PATH_TO_DIFF_DIR="${HOME}/diff/"
FILE_EXTENTION=".diff"
USER_NAME="<user_name>"
USER_PASSWORD="<user_password>"
PROJECT_NAME="<project_name>"
# if "$1" is empty