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
| calvin$ mkvirtualenv -p python2.7 --no-site-packages senatus2 | |
| Running virtualenv with interpreter /opt/local/bin/python2.7 | |
| The --no-site-packages flag is deprecated; it is now the default behavior. | |
| New python executable in senatus2/bin/python | |
| Installing setuptools............done. | |
| Installing pip...............done. | |
| virtualenvwrapper.user_scripts creating /Users/calvin/.virtualenvs/senatus2/bin/predeactivate | |
| virtualenvwrapper.user_scripts creating /Users/calvin/.virtualenvs/senatus2/bin/postdeactivate | |
| virtualenvwrapper.user_scripts creating /Users/calvin/.virtualenvs/senatus2/bin/preactivate | |
| virtualenvwrapper.user_scripts creating /Users/calvin/.virtualenvs/senatus2/bin/postactivate |
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
| Jeans-MacBook-Air.local ttys005 Thu Aug 02 08:24:11 |~| | |
| calvin$ sudo port -v install g95 | |
| ---> Computing dependencies for g95.. | |
| ---> Dependencies to be installed: libtool | |
| ---> Fetching archive for libtool | |
| ---> libtool-2.4.2_2.darwin_11.x86_64.tbz2 doesn't seem to exist in /opt/local/var/macports/incoming/verified | |
| ---> Attempting to fetch libtool-2.4.2_2.darwin_11.x86_64.tbz2 from http://packages.macports.org/libtool | |
| % Total % Received % Xferd Average Speed Time Time Time Current | |
| Dload Upload Total Spent Left Speed | |
| 100 512k 100 512k 0 0 75202 0 0:00:06 0:00:06 --:--:-- 94992 |
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
| // Google.v3 uses EPSG:900913 as projection, so we have to | |
| // transform our coordinates | |
| mapProjection = map.getProjectionObject() | |
| map.setCenter(new OpenLayers.LonLat(map_center_lon, map_center_lat).transform(defaultProjection, mapProjection), map_zoom) |
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 setattr | |
| """ | |
| # Normal | |
| item.price = self.request['price'] | |
| item.quantity = self.request['quantity'] | |
| item.shipping = self.request['shipping'] | |
| item.save() |
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
| cd ~/work | |
| mkvirtualenv -p python2.7 --no-site-packages --distribute pythonio | |
| pip install -e git+git://github.com/django/django.git#egg=django | |
| django-admin.py startproject pythonio | |
| cd pythonio | |
| git init | |
| git remote add origin ssh://[email protected]/pythonio/pythonio.git |
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
| #include <string> | |
| struct World | |
| { | |
| void set(std::string msg) { mMsg = msg; } | |
| std::string greet() { return mMsg; } | |
| std::string mMsg; | |
| }; | |
| #include <boost/python.hpp> |
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
| cd ~ | |
| mkdir ~/work/yeoman-test | |
| nodeenv yeoman-test | |
| source yeoman-test/bin/activate | |
| cd ~/work/yeoman-test | |
| npm install -g yeoman | |
| yeoman init angular | |
| [?] Would you like to include Twitter Bootstrap? (Y/n) Y | |
| [?] If so, would you like to use Twitter Bootstrap for Compass (as opposed to vanilla CSS)? (Y/n) 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
| package main | |
| import ( | |
| "labix.org/v2/mgo" | |
| "html/template" | |
| "net/http" | |
| "log" | |
| "./signup" | |
| ) |
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
| package main | |
| import ( | |
| "net/http" | |
| ) | |
| func sign(w http.ResponseWriter, req *http.Request) { | |
| if req.Method != "POST" { | |
| http.NotFound(w, req) |
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 sys | |
| import gevent | |
| from gevent import monkey | |
| monkey.patch_all() | |
| import grequests | |
| import urllib2 |