Skip to content

Instantly share code, notes, and snippets.

@ifnull
ifnull / packages.md
Created March 18, 2014 23:34
Sublime Packages
  • Doc​Blockr: Simplifies writing DocBlock comments in Javascript, PHP, CoffeeScript, Actionscript, C & C++
  • Spacegray: Theme
  • SublimeLinter: Interactive code linting framework for Sublime Text 3
  • BracketHighlighter: Bracket and tag highlighter for Sublime Text
  • Python Flake​8 Lint: heck Python files with flake8 (PEP8, pyflake and mccabe)
@ifnull
ifnull / Vagrantfile
Created March 28, 2014 03:16
Salt Master Debug
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@ifnull
ifnull / speed-up-vagrant-virtualbox.md
Created May 12, 2014 20:51
Speed up Vagrant / VirtualBox

Speed up Vagrant / VirtualBox

Requirements

  • Windows users will need to install the vagrant-winnfsd plugin.

Notes

  • Trailing shash needed for all NFS mounts
  • Remove old Salt provisioner. vagrant plugin uninstall vagrant-salt
[root@vagrant-centos65 ~]# /tmp/bootstrap_salt.sh -v
/tmp/bootstrap_salt.sh -- Version 1.5.5
[root@vagrant-centos65 ~]# /tmp/bootstrap_salt.sh -D -F -c /tmp -k /tmp/minion-seed-keys -C
* ERROR: Option does not exist : F
Usage : bootstrap-salt.sh [options] <install-type> <install-type-args>
Installation types:
- stable (default)

How-to: Upgrade VBoxGuestAdditions

This process will upgrade VBoxGuestAdditions from CLI in Vagrant (or just straight VirtualBox).

This is easier if we are root so ...

sudo su -

Next we make sure the packages that are usually removed to slim the box are re-added so that we can recompile VBoxGuestAdditions. After that we download and compile VBoxGuestAdditions followed by a little clean up.

@ifnull
ifnull / Vagrantfile.rb
Created May 14, 2014 18:07
mitchellh/vagrant VBoxManage not returning guest IP
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "madjango-base"
config.vm.box_url = "http://**************/madjango-base.box"
config.vm.post_up_message = "This is a Test"
@ifnull
ifnull / prismjs-bookmarklet-example.html
Created May 17, 2014 00:35
PrismJS Bookmarklet Example
<a href='javascript: (function(){var e="https://your.website.com/prismjs/";var t=document.createElement("script");var n=document.createElement("link");t.setAttribute("src",e+"prism.js");n.setAttribute("href",e+"prism.css");n.setAttribute("rel","stylesheet");document.body.appendChild(n);document.body.appendChild(t);t.onload=function(){Prism.highlightAll()}})()'>Bookmarklet</a>
@ifnull
ifnull / fix-13-permission-denied-centos.md
Last active August 29, 2015 14:02
CentOS/Redhat (13)Permission denied: proxy: HTTP: attempt to connect to 127.0.0.1

Did you allow httpd to connect to the network?

setsebool -P httpd_can_network_connect 1
service httpd restart
@ifnull
ifnull / doc.md
Created June 3, 2014 22:11
Solving Apache 503 “Service temporarily unavailable” error in Gunicorn/Apache on CentOS

Error

[Tue Jun 03 22:05:51 2014] [error] (111)Connection refused: proxy: HTTP: attempt to connect to 127.0.0.1:8001 (127.0.0.1) failed
[Tue Jun 03 22:05:51 2014] [error] ap_proxy_connect_backend disabling worker for (127.0.0.1)
[Tue Jun 03 22:05:52 2014] [error] proxy: HTTP: disabled connection for (127.0.0.1)
[...]

The problem is that the Apache proxy module, recognising that the service was unavailable, stopped redirecting requests to it for one minute.

@ifnull
ifnull / doc.md
Created June 3, 2014 23:14
CentOS/Redhat (13)Permission denied: access to [...] denied

Everything worked fine until you added an Alias to your vhost. The Gunicorn requests are working but none of the ProxyPass requests are being processed.

Did you move the webroot from /var/wwwor similar to something like /srv/apps?

chcon -Rv --type=httpd_sys_content_t /srv/apps

References:

http://www.petefreitag.com/item/793.cfm