This file contains 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 datetime | |
print datetime.strptime('2013-10-29T02:03:59Z','%Y-%m-%dT%H:%M:%S%z' |
This file contains 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
$ python pings_api.py | |
200 /v2/analytics/posts {"message": "Forbidden", "code": 403, "success": false} | |
200 /v2/analytics/authors {"message": "Forbidden", "code": 403, "success": false} | |
200 /v2/search {"message": "missing api key", "code": 500, "success": false} | |
200 /v2/realtime/posts {"message": "Forbidden", "code": 403, "success": false} | |
200 /v2/analytics/author/Jeff%20Poor/detail {"message": "Forbidden", "code": 403, "success": false} | |
200 /v2/analytics/post/detail {"message": "Forbidden", "code": 403, "success": false} | |
200 /v2/related {"message": "missing api key", "code": 500, "success": false} | |
403 /v2/shares/posts {"message": "Forbidden", "code": 403, "success": false} | |
403 /v2/shares/authors {"message": "Forbidden", "code": 403, "success": false} |
This file contains 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
// Clears the recommendations div. | |
function clearResults() { | |
var recDiv = $("#recommendations"); | |
recDiv.innerHtml = "<p>Recommendations results to appear here.</p>"; | |
console.log('Reset.'); | |
} |
This file contains 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
JS: | |
// Callback to populate recommendations div. | |
callback = function(data) { | |
recDiv.html(""); | |
$.each(data.data, function(i, datum) { | |
var thumb = "<div class='thumb'><img src='" + datum.thumb_url_medium + "'></div>", | |
title = "<div class='title'>" + datum.title + "</div>" | |
recDiv.append("<div class='post'>"+title+thumb+"</div>"); | |
}); |
This file contains 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
screen -S give_the_session_a_name #starts a new session | |
screen -list #list session | |
screen -r session_name_pid_thinger # reattach |
This file contains 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
Not pushing branch | |
================== | |
1. git branch feature_name | |
2. git checkout feature_name | |
3. vim awesome_file && make awesome_changes | |
4. git commit --verbose awesome_file | |
5. git show (review changes briefly) | |
6. git checkout master | |
7. git rebase feature_name | |
8. git pull --rebase origin master |
This file contains 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
$ which gollum | |
» ~/Code/Parsely/web.wiki (web+wiki) [master] | |
$ gem which gollum | |
/usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/gems/2.0.0/gems/gollum-2.5.1/lib/gollum.rb | |
» ~/Code/Parsely/web.wiki (web+wiki) [master] | |
$ echo $PATH | |
/usr/local/bin:/usr/local/bin:/Users/gw/.virtualenvs/web+wiki/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin::/usr/local/sbin:/Users/gw/.gem/ruby/1.8::/usr/local/sbin:/Users/gw/.gem/ruby/1.8:/Users/gw/.gem/ruby/2.0.0::/usr/local/sbin:/Users/gw/.gem/ruby/1.8:/Users/gw/.gem/ruby/2.0.0:/usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/gems/2.0.0/ | |
» ~/Code/Parsely/web.wiki (web+wiki) [master] | |
$ ruby -v | |
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.5.0] |
This file contains 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
airy:rapid-web gw$ easy_install --version | |
usage: easy_install [options] requirement_or_url ... | |
or: easy_install --help | |
error: option --version not recognized |
This file contains 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
gw@airy ~> pip --version | |
pip 1.4.1 from /Users/gw/anaconda/lib/python2.7/site-packages (python 2.7) | |
gw@airy ~> sudo pip install virtualenv | |
Password: | |
WARNING: using virtualenv with Anaconda is untested and not recommended. | |
We suggest using the conda command to create environments instead. | |
For more information about creating conda environments, please see: | |
http://docs.continuum.io/conda/examples/create.html |
This file contains 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
airy:PyCodez gw$ pip | |
Traceback (most recent call last): | |
File "/usr/local/bin/pip", line 5, in <module> | |
from pkg_resources import load_entry_point | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module> | |
working_set.require(__requires__) | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require | |
needed = self.resolve(parse_requirements(requirements)) | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve | |
raise DistributionNotFound(req) # XXX put more info here |