Concepts and definitions for SVG.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| from Products.CMFCore.utils import getToolByName | |
| from plone.app.textfield.value import RichTextValue | |
| from zope.component.hooks import getSite | |
| import logging | |
| log = logging.getLogger(__name__) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Grab version files from dist.plone.org for each Plone version. | |
| Original location: | |
| https://gist.github.com/mauritsvanrees/99cb4a25b622479e7dc3 | |
| Goal: grep through these files to see which version of a package is | |
| used in which Plone version. | |
| Usage: | |
| $ virtualenv-2.7 . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] | |
| RewriteRule ^(.*) https://%1$1 [R=301,L] | |
| RewriteCond %{HTTP_HOST} ^mysubdomain\.mysite\.com | |
| RewriteRule ^/(.*)$ http://127.0.0.1:9090/VirtualHostBase/https/%{SERVER_NAME}:%{SERVER_PORT}/subdomain/VirtualHostRoot/$1 [L,P] |
- Related Setup: https://gist.github.com/hofmannsven/6814278
- Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
- Interactive Beginners Tutorial: http://try.github.io/
- Git Cheatsheet by GitHub: https://services.github.com/on-demand/downloads/github-git-cheat-sheet/
Press minus + shift + s and return to chop/fold long lines!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| class Toy(object): | |
| inventory = 0 | |
| def __init__(self, price, name, quantity): | |
| self.price = price | |
| self.name = name | |
| self.quantity = quantity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Use with | |
| bin/instance run export_skin_folder.py | |
| This script will extract the portal_skins folder | |
| named in SKINFODLER_NAME to the DEST directory | |
| """ | |
| import os | |
| import sys | |
| PLONE_PORTAL = 'Plone' |
-
Navigate to http://nodejs.org/download/ and on the Linux Binaries (.tar.gz) row click to download the 64-bit version of the current latest release.
-
Say you've downloaded
node-v0.10.7-linux-x64.tar.gzinto theDownloadsdirectory. Then, open the terminal and type the following:
$ cd ~/Downloads
$ mkdir -p ~/local/node
$ tar xzf node-v0.10.7-linux-x64.tar.gz -C ~/local/node --strip-components=1
$ echo '# Node Enviroment Setup' >> ~/.bashrc
$ echo 'export PATH=$HOME/local/node/bin:$PATH' >> ~/.bashrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # All SSH libraries for Python are junk (2011-10-13). | |
| # Too low-level (libssh2), too buggy (paramiko), too complicated | |
| # (both), too poor in features (no use of the agent, for instance) | |
| # Here is the right solution today: | |
| import subprocess | |
| import sys |