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
sudo: required | |
dist: trusty | |
language: node_js | |
node_js: | |
- "6" | |
cache: | |
apt: true |
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
1) gitlab installation | |
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-gitlab-on-ubuntu-16-04 | |
generate SSL certs for gitlab and configure gitlab for https | |
self-signed certificates are a problem for runners; to overcome this problem, follow the instructions on | |
http://moonlightbox.logdown.com/posts/2016/09/12/gitlab-ci-runner-register-x509-error | |
a) specify common name default for SSL certs (instruction different from above URL) | |
$vi /etc/ssl/openssl.cnf | |
[ v3_ca ] |
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
To remove restriction on the length of usernames, remove / comment out the lines 311 - 314 of main_server.js. The lines are shown below. | |
if(id_number.length!=12) | |
{ | |
flag=0; | |
} | |
pending submission block is happening on lines 277-282 of main_server.js |
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
# to be run inside tests/functional_tests/ directory after "npm install" command | |
const argv = require('minimist')(process.argv.slice(2)); | |
const io = require('socket.io-client'); | |
const submit = function submit(host, idNo, currentLab, commitHash, language) { | |
const req = [idNo, currentLab, commitHash, language]; | |
const socket = io.connect(host); |
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
Snakefood (http://furius.ca/snakefood/) is a python dependency graph generator. The package performs static call sequence analysis on a set of given python files. We can use it to identify static call graph of the project. | |
As a sample, install snakefood and then the following instructions generated a decent result. | |
$git clone | |
$cd IRCLogParser/IRCLogParser | |
$sfood lib/* | sfood-graph | dot -Tpdf -o graph.pdf | |
sfood lib/* | sfood-graph | dot -Tpng -Gsize=9,15\! -Gdpi=300 -o graph.png | |
The graph generated is available at: http://pasteboard.co/2ENQSGA5j.png |
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
pythoncallgraph is useful for plotting callgraphs of python code base. The software works by default, but has quirky behavior for some of the options. | |
To reproduce this tutorial, do the following. | |
(graphviz already installed) | |
$pip install pycallgraph | |
$cat > scrapyTest.py <<EOF | |
import scrapy | |
class BlogSpider(scrapy.Spider): |
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
var argv = require('minimist')(process.argv.slice(2)); | |
var io = require('socket.io-client'); | |
var submit = function(host, id_no, current_lab, commit_hash, language) { | |
var req = [id_no, current_lab , commit_hash, language]; | |
var socket = io.connect(host); | |
socket.emit('submission', req); | |
socket.on('invalid', function(data) { | |
console.log('Access Denied. Please try submitting again'); |
NewerOlder