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
from pyramid.paster import bootstrap | |
def main(): | |
# Bootstrap | |
env = bootstrap('production.ini') | |
request = env['request'] | |
db = request.db | |
tm = request.tm |
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
class Classy(object): | |
def __init__(self): | |
self.i = 0 | |
@property | |
def prop(self): | |
self.i += 1 | |
return self.i | |
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
from clusterapp.tests import TestCase | |
class TestQueue(TestCase): | |
def test_create_commit(self): | |
new_courses = { | |
'Intro to Physics': ['PHYS 101', 'PHYS 102', 'PHYS 103'], | |
'Intro to Computer Science': ['CS 3030', 'CS 3031'], | |
'Intro to Earth Science': ['ECE 100', 'CEE 100', 'DRE 100'], | |
'Elementary Psychology': ['PSY 101'], |
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
Traceback (most recent call last): | |
File "/opt/webapp/clustermobile/bin/pserve", line 9, in <module> | |
load_entry_point('pyramid==1.5a2', 'console_scripts', 'pserve')() | |
File "/opt/webapp/clustermobile/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 51, in main | |
return command.run() | |
File "/opt/webapp/clustermobile/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 316, in run | |
global_conf=vars) | |
File "/opt/webapp/clustermobile/lib/python2.7/site-packages/pyramid/scripts/pserve.py", line 340, in loadapp | |
return loadapp(app_spec, name=name, relative_to=relative_to, **kw) | |
File "/opt/webapp/clustermobile/lib/python2.7/site-packages/paste/deploy/loadwsgi.py", line 247, in loadapp |
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
# Go into /opt/webapp/clusterflunk/src | |
# and type heroku pg:psql | |
# You can add the courses/sections you need with the following two SQL commands | |
insert into courses(name, created, network_id, founder_id) values ('Course Name', now(), <network_id>, 59); | |
insert into sections(name, number, course_id) values ('Course Name', 'Course Number', <course_id); | |
# Then from the same directory, update the search index by calling fab update_search_index_courses:<network_id>, | |
# where <network_id> is replaced with the id of the network you're updating |
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
Create a user named vagrant | |
Add vagrant to sudoers | |
sudo apt-get install build-essentials | |
Install git | |
Install mercurial | |
Install docker by following these directions http://docs.docker.io/en/latest/installation/ubuntulinux/ | |
sudo chown vagrant:vagrant /var/run/docker.sock | |
Checkout flynn-dev(https://github.com/flynn/flynn-dev) | |
mkdir /home/vagrant/go |
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
PC=0x426049 | |
runtime.epollwait(0x7f0500000004, 0x7ffff2217dd0, 0xffffffff00000080) | |
/usr/local/go/src/pkg/runtime/sys_linux_amd64.s:385 +0x19 | |
runtime.netpoll(0xa08f01) | |
/usr/local/go/src/pkg/runtime/netpoll_epoll.c:71 +0x7d | |
findrunnable() | |
/usr/local/go/src/pkg/runtime/proc.c:1222 +0x386 | |
schedule() | |
/usr/local/go/src/pkg/runtime/proc.c:1320 +0xe3 |
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
type Config struct { | |
DefaultApiUrl string | |
Remotes map[string]remote | |
} | |
type remote struct { | |
Name string | |
Url string | |
ApiUrl string | |
} |
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
DefaultApiUrl = "http://localhost:4001" | |
[Remotes] | |
[Remotes.production] | |
Url = "git@herokuapp.com:clusterflunk.git" | |
ApiUrl = "http://localhost:4001" |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"os" | |
"reflect" | |
) |
OlderNewer