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
# In my environment json file: | |
"default_attributes": { | |
"source_dir": "/vagrant/source_dir" | |
}, | |
# When I look in the list of attributes at https://manage.opscode.com/nodes/[node_name], | |
# I see the 'source_dir' attribute, so far so good. | |
# Then, in my cookbook's default.rb attributes file: | |
default['mycookbook']['dir'] = "#{default[:source_dir].to_s}/mycookbook" |
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
(xmpp-env)vagrant@lucid32:/vagrant/xmpp-env/xmpp$ python leaf_component.py | |
Traceback (most recent call last): | |
File "leaf_component.py", line 14, in <module> | |
import sleekxmpp | |
File "/vagrant/xmpp-env/lib/python2.6/site-packages/sleekxmpp/__init__.py", line 9, in <module> | |
from sleekxmpp.basexmpp import BaseXMPP | |
File "/vagrant/xmpp-env/lib/python2.6/site-packages/sleekxmpp/basexmpp.py", line 22, in <module> | |
from sleekxmpp import plugins, features, roster | |
File "/vagrant/xmpp-env/lib/python2.6/site-packages/sleekxmpp/roster/__init__.py", line 9, in <module> | |
from sleekxmpp.xmlstream import JID |
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
vagrant@lucid32:/vagrant$ virtualenv test0 | |
New python executable in test0/bin/python | |
Traceback (most recent call last): | |
File "/usr/local/bin/virtualenv", line 9, in <module> | |
load_entry_point('virtualenv==1.8.4', 'console_scripts', 'virtualenv')() | |
File "/usr/local/lib/python2.6/dist-packages/virtualenv.py", line 964, in main | |
never_download=options.never_download) | |
File "/usr/local/lib/python2.6/dist-packages/virtualenv.py", line 1065, in create_environment | |
site_packages=site_packages, clear=clear)) | |
File "/usr/local/lib/python2.6/dist-packages/virtualenv.py", line 1485, in install_python |
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
//In the Javascript console on http://elections.nytimes.com/2012/results/president, paste the following: | |
NYTD.NYTINT.Bigboard.Bigboard.prototype.render_timer = function() { | |
// Do nothing if the board isn't live. | |
if (!this.is_live()) { | |
return false; | |
} | |
// If we've counted to zero, re-load the data. | |
// Otherwise, decrement the counter. |
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
Last login: Tue Aug 14 02:41:31 on ttys004 | |
~/Desktop/vagrant_test 3949$ ls | |
~/Desktop/vagrant_test 3950$ vagrant box add base http://files.vagrantup.com/lucid32.box | |
[vagrant] Downloading with Vagrant::Downloaders::HTTP... | |
[vagrant] Downloading box: http://files.vagrantup.com/lucid32.box | |
[vagrant] Extracting box... | |
[vagrant] Verifying box... | |
[vagrant] Cleaning up downloaded box... | |
~/Desktop/vagrant_test 3951$ vagrant init | |
A `Vagrantfile` has been placed in this directory. You are now |
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
import logging | |
from sleekxmpp import ClientXMPP | |
from sleekxmpp.exceptions import IqError, IqTimeout | |
class GUIMessageBot(ClientXMPP): | |
def __init__(self, jid, password, gui_function): | |
ClientXMPP.__init__(self, jid, password) |
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
INFO Account created for admin1@localhost/5406992631335734544375229! | |
DEBUG SEND (IMMED): </stream:stream> | |
INFO Waiting for </stream:stream> from server | |
DEBUG End of stream recieved | |
DEBUG Waiting for 3 threads to exit. | |
DEBUG Quitting Scheduler thread | |
DEBUG Stopped scheduler thread. 2 threads remain. | |
DEBUG Stopped send thread. 1 threads remain. | |
DEBUG Could not acquire lock | |
Done |
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
diff --git a/examples/register_account.py b/examples/register_account.py | |
index 17f075a..eeb669d 100644 | |
--- a/examples/register_account.py | |
+++ b/examples/register_account.py | |
@@ -39,8 +39,9 @@ class RegisterBot(sleekxmpp.ClientXMPP): | |
workflows will need to check for data forms, etc. | |
""" | |
- def __init__(self, jid, password): | |
+ def __init__(self, jid, password, to_register): |
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
~/Desktop/vagrant_1/code/ejabberd/src 176$ diff ejabberd.cfg ejabberd.cfg.example | |
368c368 | |
< {acl, admin, {user, "admin1", "localhost"}}. | |
--- | |
> %%{acl, admin, {user, "aleksey", "localhost"}}. | |
391,395d390 | |
< %% Unauthenticated users | |
< %% | |
< {acl, unauthenticated, {user, "", ""}}. | |
< |
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
root@lucid32:/vagrant/code/SleekXMPP# python /vagrant/code/SleekXMPP/examples/register_account.py -v -j 'admin1@localhost' -p 'test_password' -u 'new_username' | |
DEBUG setting jid to admin1@localhost | |
DEBUG Loaded Plugin: RFC 6120: Stream Feature: STARTTLS | |
DEBUG Loaded Plugin: RFC 6120: Stream Feature: Resource Binding | |
DEBUG Loaded Plugin: RFC 3920: Stream Feature: Start Session | |
DEBUG Loaded Plugin: RFC 6120: Stream Feature: SASL | |
DEBUG Loaded Plugin: RFC 6121: Stream Feature: Roster Versioning | |
DEBUG Loaded Plugin: XEP-0030: Service Discovery | |
DEBUG Loaded Plugin: XEP-0004: Data Forms | |
DEBUG Loaded Plugin: XEP-0066: Out of Band Data |