Skip to content

Instantly share code, notes, and snippets.

@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, <[email protected]>
# 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
@oleksandr-diudiun
oleksandr-diudiun / os-x-install.sh
Last active November 13, 2018 22:56 — forked from max-mykhailenko/os-x-install.sh
OSX install apache, php, mysql, postgres, node, npm, brew guide. Full OSX workstation (settings) for frontend developer
# - Start to Install xCode (download 4 Gb)
# - Setup languages
# - max key repeat speed
# - Short delay before repeat
# - enable Show symbols in menu bar
# - disable correct spelling
# - Shortcuts
# - Other items in settings
# - Run xCode
# - Setup time machine
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms
[alias]
start = !git fetch && git checkout
cm = !git add -A && git commit -m
save = !git add -A && git commit -m 'SAVEPOINT'
amend = commit -a --amend
undo = reset HEAD~1 --mixed
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
repair = !sh -c \"git diff --name-only | uniq | xargs subl\"
unmerged = !git branch -r --no-merged | grep -v HEAD | xargs -L1 git --no-pager log --pretty=tformat:'%Cgreen%d%Creset | %h | %an | %Cblue%ar%Creset' -1 | column -t -s '|'
merged = !git branch -r --merged | grep -v HEAD | xargs -L1 git --no-pager log --pretty=tformat:'%Cgreen%d%Creset | %h | %an | %Cblue%ar%Creset' -1 | column -t -s '|'
The regex patterns in this gist are intended only to match web URLs -- http,
https, and naked domains like "example.com". For a pattern that attempts to
match all URLs, regardless of protocol, see: https://gist.github.com/gruber/249502
# Single-line version:
(?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|s

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software