Skip to content

Instantly share code, notes, and snippets.

@oleksandr-diudiun
oleksandr-diudiun / ..OS X High Sierra
Last active October 27, 2017 09:29
OS X High Sierra install
- Start to Install xCode (download 4 Gb)
Configure all settings:
- Setup languages
- max key repeat speed
- Short delay before repeat
- enable Show symbols in menu bar
- disable correct spelling
- Shortcuts
- Configure zoom in accessebility
@oleksandr-diudiun
oleksandr-diudiun / .bash_profile
Created October 19, 2017 15:21
iMac Bash Profile
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
eval "$(fasd --init auto)"
GIT_PS1_SHOWUPSTREAM="auto"
GIT_PS1_SHOWCOLORHINTS="yes"
export PROMPT_COMMAND='__git_ps1 "-> \W:" "\\\$ ";'
export HISTCONTROL=ignoreboth:erasedups
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
@oleksandr-diudiun
oleksandr-diudiun / settings.json
Created October 7, 2016 12:01
last good sublime3 settings
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
# You can use the WebUpd8 Java PPA, so you get updates automatically through the package manager.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
sudo update-java-alternatives -s java-7-oracle
# Are PPA's safe to add to my system and what are some "red flags" to watch out for?
# If you need the latest Oracle Java 6, you install it too:
sudo apt-get install oracle-java6-installer
@oleksandr-diudiun
oleksandr-diudiun / Install-php7.md
Created December 11, 2015 23:39 — forked from hollodotme/Install-php7.md
Installing php7-fpm with phpredis extension on Ubuntu 14.04

Install php7.0-fpm

# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php-7.0
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
@oleksandr-diudiun
oleksandr-diudiun / rabbitmq.sh
Created December 1, 2015 19:59 — forked from anubhavsinha/rabbitmq.sh
rabbimq on ubuntu 14.04LTS
sudo apt-get update
# install erlang
sudo apt-get install erlang -y
sudo apt-get install erlang-nox -y
# get deb package
echo deb http://www.rabbitmq.com/debian/ testing main | sudo tee /etc/apt/sources.list
# add key

Ubuntu Server

The steps taken to setup a Ubuntu web server.

Update

Update Aptitude:

sudo apt-get update
@oleksandr-diudiun
oleksandr-diudiun / iptables_setup.sh
Created December 1, 2015 19:56 — forked from baldasso/iptables_setup.sh
Generate rules for iptables. Use it as reference
#!/bin/bash
#------------------------------------------------------------------------------
# iptables_setup.sh - Set default rules for iptables.
# Matheus Baldasso, <baldasso.matheus@gmail.com>
# Clean up all tables, set default policy for table filter, set a bunch of
# rules for INPUT and OUTPUT chain and log all dropped packets. By Default all
# requests are blocked, unless a rule is set. Used for reference and customize
# for your environment.
@oleksandr-diudiun
oleksandr-diudiun / iptables.sh
Created December 1, 2015 19:52 — forked from sandcastle/iptables.sh
Default firewall configuration using iptables for a fresh Ubuntu 14.04 server.
#!/bin/sh -x
# ==================================
# iptables default configuration script
#
# - this locks down our servers port access
# ==================================
# install fail2ban
sudo apt-get update