Skip to content

Instantly share code, notes, and snippets.

View monotasker's full-sized avatar

Ian W. Scott monotasker

View GitHub Profile
#!/bin/env python2.7
"""
Web2py install/uninstall script for WebFaction using the latest stable source
code from http://www.web2py.com/examples/static/web2py_src.zip.
This installs web2py for Python 2.7, served via Nginx 1.8.0 and uWSGI 2.0.10.
The web2py files are found in ~/webapps/<app_name>/web2py.
IMPORTANT: Remember to set the Admin password in the extra_info field.
Caveats
-------
@monotasker
monotasker / wf_apache_install.py
Last active April 30, 2020 21:07
webfaction apache web2py installer
#!/bin/env python2.6
"""
Web2py install/uninstall script for WebFaction using the latest stable source
code from http://www.web2py.com/examples/static/web2py_src.zip. This installs
web2py for Python 2.7 along with Apache + mod_wsgi v4.4.13. The web2py files
are found in ~/webapps/<app_name>/web2py.
IMPORTANT: Remember to set the Admin password in the extra_info field.
@monotasker
monotasker / 0_reuse_code.js
Created June 18, 2014 01:46
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@monotasker
monotasker / iconfont-css
Created May 25, 2012 18:48
CSS for using icon font without any accompanying visible text (just text for screen readers)
.icon-alone {
display: inline-block; /* Fix for clickability issue in WebKit */
}
.screen-reader-text { /* Reusable, toolbox kind of class */
position: absolute;
top: -9999px;
left: -9999px;
}
@monotasker
monotasker / iconfont-html
Created May 25, 2012 18:45
Markup for using icon font without any accompanying visible text (just text for screen readers)
<a href="#rss" class="icon-alone">
<span aria-hidden="true" data-icon="&#x25a8;"></span>
<span class="screen-reader-text">RSS</span>
</a>
@monotasker
monotasker / iconfont-withtext-css
Created May 25, 2012 18:41
CSS for adding icon to text with icon font
[data-icon]:before {
font-family: icons; /* BYO icon font, mapped smartly */
content: attr(data-icon);
speak: none; /* Not to be trusted, but hey. */
}
@monotasker
monotasker / iconfont-withtext-html
Created May 25, 2012 18:40
Markup for using icon font
<h2 id="">
<span aria-hidden="true" data-icon="character"></span>
Text
</h2>