Skip to content

Instantly share code, notes, and snippets.

@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
@oleksandr-diudiun
oleksandr-diudiun / Ubuntu
Last active January 11, 2016 07:21
Amazon Ubuntu
$ sudo nano /etc/hostname # set your-server-name
$ sudo nano /etc/hosts # set your-server-name
$ sudo service hostname restart # or sudo reboot
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install apache2
$ sudo apt-get install apache2-utils
$ sudo a2enmod rewrite
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
@oleksandr-diudiun
oleksandr-diudiun / install-rabbit-mq.sh
Last active August 29, 2015 14:15
Install RabbitMQ on Ubuntu server
nano /etc/apt/sources.list
# add this deb pack to file: "deb http://www.rabbitmq.com/debian/ testing main" without quotes
# save file
# To avoid warnings about unsigned packages, add our public key to your trusted key list
wget https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
sudo apt-key add rabbitmq-signing-key-public.asc
sudo apt-get update
[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
alias ls='ls $LS_OPTIONS -hA'
alias ll='ls $LS_OPTIONS -lAh'
alias l='ls $LS_OPTIONS -lAh'
alias cd..="cd .."
alias c="clear"
alias e="exit"
alias ..="cd .."
alias .="open ."
alias mkdir='mkdir -pv'
alias now='date +"%d-%m-%Y %T"'
// Install plugins:
// SublimeLinter
// SublimeLinter-php
// PHP must be from brew
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
{
"codeintel_enabled_languages":
[
"PHP"
],
"codeintel_live_enabled_languages":
[
"PHP"
],

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