Skip to content

Instantly share code, notes, and snippets.

View Voronenko's full-sized avatar
turning coffee into code since late 90s

Vyacheslav Voronenko

turning coffee into code since late 90s
View GitHub Profile
@Voronenko
Voronenko / remove_all_gems_windows
Created March 13, 2014 09:43
Remove all gems windows
ruby -e "`gem list`.split(/$/).each { |line| puts `gem uninstall -Iax #{line.split(' ')[0]}` unless line.empty? }"
# npm update -g npm fails with unmet semver dependencies? You have an older version of normalize-package-data,
curl https://npmjs.org/install.sh | sh
vagrant up
vagrant vbguest --do install --iso https://www.virtualbox.org/download/testcase/VBoxGuestAdditions_4.3.11-93070.iso
@Voronenko
Voronenko / gist:11401123
Created April 29, 2014 13:56
ubuntu 12.04 with built in chef minimal setup
Vagrant.configure("2") do |c|
c.vm.box = "opscode-ubuntu-12.04"
c.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box"
c.vm.hostname = "default-ubuntu-1204.vagrantup.com"
c.vm.synced_folder ".", "/vagrant", disabled: true
c.vm.provider :virtualbox do |p|
end
end
apt-get install -y curl
# Install nginx
if [ "xx" = "x$(grep 'nginx' /etc/apt/sources.list )x" ] ; then
echo 'Installing nginx...'
echo '
# Repositories for up to date nginx packages
deb http://nginx.org/packages/mainline/ubuntu/ precise nginx
deb-src http://nginx.org/packages/mainline/ubuntu/ precise nginx' >> /etc/apt/sources.list
curl -s http://nginx.org/keys/nginx_signing.key | apt-key add -
apt-get update > /dev/null
#!upstart
description "MyApp"
author "Author name"
env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
respawn
start on runlevel [23]
stop on shutdown
@Voronenko
Voronenko / gitflow-delete-merged-into-develop-branches
Created May 13, 2014 05:52
Delete all obsolete branches, that were already merged into develop on remote
git branch --merged develop | grep -v "\* develop" | xargs -n 1 git branch -d
@Voronenko
Voronenko / safe modules install under vagrant
Created May 21, 2014 18:00
safe modules install under vagrant
npm install --no-bin-links
@Voronenko
Voronenko / homesite.conf
Created May 23, 2014 06:45
site conf for dev site located under home folder
<VirtualHost *:80>
DocumentRoot "/home/slavko/labs"
ServerName labs.lvh.me
<Directory "/home/slavko/labs">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Allow from all
</Directory>
</VirtualHost>
@Voronenko
Voronenko / github_init
Created May 25, 2014 19:03
Basic steps to prepare clean ubuntu box for github
sudo apt-get install xclip
sudo apt-get install git
cd ~/.ssh
ssh-keygen -t rsa -C "YOURBOXNAME"
xclip -sel clip < ~/.ssh/id_rsa.pub