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
def _gen_ports(portstr): | |
from_port, sep, to_port = portstr.partition('-') | |
if not to_port: | |
if not sep: | |
to_port = from_port | |
else: | |
# This is an invalid configuration, such as "1-", | |
# so the port will be set to 0, which is generally | |
# not going to be seen as valid. | |
to_port = 0 |
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
>>> def check_portstr(portstr): | |
... from_port, sep, to_port = portstr.partition('-') | |
... if not to_port: | |
... if not sep: | |
... to_port = from_port | |
... else: | |
... raise Exception("onoes") | |
... return from_port, to_port | |
... | |
>>> check_portstr("1-2") |
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
;; Buffer indention stuff, either indent region or buffer w/ a C-M-\ | |
(defun indent-buffer () | |
"Indent the currently visited buffer." | |
(interactive) | |
(indent-region (point-min) (point-max))) | |
(defun indent-region-or-buffer () | |
"Indent a region if selected, otherwise the whole buffer." | |
(interactive) | |
(save-excursion |
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
(defun snip-reply (b e) | |
"remove selected lines, and replace with a snip" | |
(interactive "r") | |
(delete-region b e) | |
(insert "> [...]\n" )) |
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
;; Shortcut for offlineimap.el running | |
(eval-after-load "gnus" | |
'(progn | |
(define-key gnus-group-mode-map (kbd "v g") | |
(lambda () | |
(interactive) | |
(offlineimap))))) | |
;; Add a hook to get news after offlineimap is finished | |
(add-hook 'offlineimap-event-hooks (lambda (msg-type &optional action) |
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
[general] | |
pythonfile = ~/.offlineimap.py | |
accounts = gmail | |
[Account gmail] | |
localrepository = gmail-local | |
remoterepository = gmail-remote | |
status_backend = sqlite | |
[Repository gmail-local] |
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
Section "InputClass" | |
Identifier "touchpad peppy cyapa" | |
MatchIsTouchpad "on" | |
MatchDevicePath "/dev/input/event*" | |
MatchProduct "cyapa" | |
Option "FingerLow" "10" | |
Option "FingerHigh" "10" | |
EndSection |
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
21:51 -!- hub_cap [[email protected]] | |
21:51 -!- ircname : Michael Basnight | |
21:51 -!- channels : #openstack-meeting-alt #openstack-infra @#trove-core-super-secret #openstack-trove | |
21:51 -!- server : asimov.freenode.net [TX, USA] | |
21:51 -!- away : intermission | |
21:51 -!- hostname : 162.209.127.37 162.209.127.37 | |
21:51 -!- idle : 0 days 0 hours 0 mins 7 secs [signon: Thu Jan 16 04:12:21 2014] | |
21:51 -!- account : hub_cap | |
21:51 -!- End of WHOIS |
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
2014-01-23 02:27:48.670 DEBUG trove.common.wsgi [req-ca5e4f43-f7ba-4360-a2e0-1c7f7a9d6bb8 f58950e1cda44b5d8ef81591898c8efb 5f4950fa1da540be974dee6c3eae664c] Getting schema for type:show from (pid=1849) get_schema /opt/stack/trove/trove/common/wsgi.py:416 | |
2014-01-23 02:27:48.669 DEBUG routes.middleware [-] Match dict: {'action': u'show', 'tenant_id': u'5f4950fa1da540be974dee6c3eae664c', 'controller': <trove.common.wsgi.Resource object at 0x378b4d0>, 'id': u'1'} from (pid=1849) __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:103 |
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
baz@killxml:/opt/stack/cinder$ cinder type-create lvm | |
+--------------------------------------+------+ | |
| ID | Name | | |
+--------------------------------------+------+ | |
| a7f42472-bc32-4f13-a581-e12f4166bb11 | lvm | | |
+--------------------------------------+------+ | |
baz@killxml:/opt/stack/cinder$ cinder type-create lvmcinder type-key lvm set volume_backend_name=LVM_iSCSI^C | |
baz@killxml:/opt/stack/cinder$ ^C | |
baz@killxml:/opt/stack/cinder$ cinder type-key lvm set volume_backend_name=LVM_iSCSI | |
baz@killxml:/opt/stack/cinder$ cinder extra-specs-list |