Skip to content

Instantly share code, notes, and snippets.

View vbguard's full-sized avatar
:octocat:
I'm coding

Viktor Bulvarenko vbguard

:octocat:
I'm coding
View GitHub Profile
@vbguard
vbguard / iterm2-solarized.md
Created May 23, 2018 20:48 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

fetch('https://api.ipify.org?format=json')
.then(response => {
if (response.ok) return response.json();
throw Error('Error while fetching' + response.statusText);
})
.then(data => console.log(data))
.catch(err => console.log(err));
@vbguard
vbguard / .eslintrc
Created July 11, 2018 12:52
React ESLint and Prettier config
// Install following packages
// yarn add --dev eslint prettier eslint-config-airbnb@^15.0.1 eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y@^5.1.1
// or
// npm install --save-dev eslint prettier eslint-config-airbnb@^15.0.1 eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint-plugin-import eslint-plugin-jsx-a11y@^5.1.1
{
"extends": ["airbnb", "prettier", "prettier/react"],
"plugins": ["prettier"],
"parser": "babel-eslint",
"parserOptions": {
@vbguard
vbguard / html-languages.txt
Created July 12, 2018 17:12 — forked from JamieMason/html-languages.txt
HTML lang attribute / ISO language code reference / Culture names
CULTURE SPEC.CULTURE ENGLISH NAME
--------------------------------------------------------------
Invariant Language (Invariant Country)
af af-ZA Afrikaans
af-ZA af-ZA Afrikaans (South Africa)
ar ar-SA Arabic
ar-AE ar-AE Arabic (U.A.E.)
ar-BH ar-BH Arabic (Bahrain)
ar-DZ ar-DZ Arabic (Algeria)
ar-EG ar-EG Arabic (Egypt)
@vbguard
vbguard / bash_profile.md
Created December 14, 2018 23:56 — forked from irazasyed/bash_profile.md
Terminal: Mac OS X Terminal Aliases & How-To - .bash_profile / .profile

Mac OS X Terminal Aliases & How-To

Collection of some of my fav terminal aliases that i use often & collected from the web. This file will be updated with more aliases as i find more. Feel free to comment and share your fav aliases you use :)

###Follow these simple steps to add the following aliases:###


  1. Within the Terminal, run:
@vbguard
vbguard / webstoemp-gulpfile.js
Created January 11, 2019 07:07 — forked from jeromecoupe/webstoemp-gulpfile.js
Gulp 4 sample gulpfile.js
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew cask install iterm2
# update iterm2 settings -> colors, keep directory open new shell, keyboard shortcuts
brew install bash # latest version of bash
# set brew bash as default shell
brew install fortune
brew install cowsay
brew install git
@vbguard
vbguard / cors.nginxconf
Created March 26, 2019 14:25 — forked from pauloricardomg/cors.nginxconf
Nginx configuration for CORS-enabled HTTPS proxy with origin white-list defined by a simple regex
#
# Acts as a nginx HTTPS proxy server
# enabling CORS only to domains matched by regex
# /https?://.*\.mckinsey\.com(:[0-9]+)?)/
#
# Based on:
# * http://blog.themillhousegroup.com/2013/05/nginx-as-cors-enabled-https-proxy.html
# * http://enable-cors.org/server_nginx.html
#
server {
const promisify = (func) => () => new Promise((resolve) => func(resolve));
const showBackground = (resolve) => {
setTimeout(() => {
console.log('showBackground works!!!');
resolve();
} , 3000);
};
const slideSidebar = (resolve) => {
@vbguard
vbguard / f2bufwnginx.md
Created May 16, 2019 11:23 — forked from Telling/f2bufwnginx.md
Setup fail2ban (v0.8.11) with ufw and nginx

Setup fail2ban (v0.8.11) with ufw and nginx on Ubuntu 14.04

Install fail2ban & ufw

If you haven't already, install fail2ban and ufw:

sudo apt-get install fail2ban ufw

Now make a copy of the fail2ban configuration, and name it jail.local: