- Create a Travis CI account
- Go to your profile page
- Find your fork of osf.io (mine is samchrisinger/osf.io), flip the toggle to make it green
- Click the little gear. Make sure "Build pushes" is active. Maybe set "Build pull requests" too.
- Push any code to your fork of osf.io, Travis runs your tests without cluttering the CenterForOpenScience build queue.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>jQuery Experimenter Interface</title> | |
</head> | |
<body> | |
<select id="exp"></select> | |
<select id="session"></select> |
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
def main(): | |
f = open('tasks.py', 'r') | |
tasks = [] | |
lines = f.read().split('\n') | |
f.close() | |
for i in range(len(lines)): | |
line = lines[i] | |
if '@task' in line: | |
opt = lines[i + 1].replace('def ', '').split('(')[0] | |
tasks.append(opt) |
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
#!/bin/bash | |
# from http://davidsj.co.uk/blog/delete-queues-in-rabbitmq/ | |
for queue in `rabbitmqadmin -f bash list queues`; do echo $queue `rabbitmqadmin delete queue name=$queue`; done |
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
#!/bin/bash | |
sudo launchctl limit maxfiles 8096 8096 | |
sudo launchctl limit maxproc 8096 8096 | |
ulimit -n 8096 | |
ulimit -u 1024 |
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
# Is this WIP or a minor change? | |
# [skip ci] | |
# Are you ready to indicate a related Jira issue? | |
# [#OSF- ] | |
# Style guidelines | |
# ---------------- | |
# Capitalized, short (50 chars or less) summary | |
# |
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 __future__ import print_function | |
import uuid | |
import time | |
from datetime import datetime | |
fts = datetime.fromtimestamp | |
from webbrowser import open_new_tab | |
from random import randint | |
from requests.exceptions import ConnectionError |
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 __future__ import print_function | |
import uuid | |
import time | |
from datetime import datetime | |
fts = datetime.fromtimestamp | |
from webbrowser import open_new_tab | |
from random import randint | |
from requests.exceptions import ConnectionError |
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
$('#submit').on('click', function(e){ | |
e.preventDefault(); //IMPORTANT-- you must stop the form from automatically sending a POST request | |
var obs = $('#observer_form').serializeArray(); | |
var met = $('#metrics_form').serializeArray(); | |
var site = $('#site_form').serializeArray() | |
}); | |
// This returns three arrays of objects like {name:NAME, value:VALUE}. This is grabbing the HTML name attribute of the form contents as well at their values. I've added check boxes next to my <input> tags so blank fields don't get submitted. This looks something like: | |
$('.toggle').on('change', function(){ |
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
$('#loginsubmit').on('click', function(){ | |
$.post('https://pegasus.cs.virginia.edu/rcs/tokens.json', | |
{email: $('#email').val(), | |
password: $('#password').val()}, | |
function(res){ | |
console.log(res.token); | |
}).error(function(err){ | |
console.log(err); | |
}); | |
}); |