sudo apt-get install nghttp2 libnghttp2-dev
http://curl.haxx.se/download/curl-7.46.0.tar.bz2
tar -xvjf curl-7.46.0.tar.bz2
cd curl-7.46.0
./configure --with-nghttp2 --prefix=/usr/local
make
sudo make install
sudo ldconfig
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 Fixnum | |
VERSION=1 | |
ROMAN_SYMBOL_MAPPING= { | |
1=> "I", | |
5=> "V", | |
10=>"X", | |
50=>"L", | |
100=>"C", | |
500=>"D", | |
1000=>"M" |
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
gem install mysql -- --with-mysql-config=/usr/bin/mariadb_config |
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
we limit data collected about you and your use of the platform; | |
your personal information is never for sale; | |
we use and disclose information to prevent people from abusing the platform; but | |
we never disclose it for any other reason unless required by law. |
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
// Sometimes it's necessary to do a bit of clean-up | |
Array.prototype.forEach.call(document.querySelectorAll('.js-comment-delete button'), function(el, i) { | |
el.removeAttribute('data-confirm'); | |
el.click(); | |
}); |
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/ksh | |
typeset port=$((RANDOM % 60000)) | |
while ((port < 30000)); do | |
port=$((RANDOM % 60000)) | |
done | |
typeset pipe=`mktemp -u` | |
mkfifo $pipe | |
trap "rm -f $pipe" INT |
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 TABLE user_shelves( | |
id serial PRIMARY KEY, | |
USER_id INTEGER NOT NULL REFERENCES users(id), | |
shelf_id INTEGER NOT NULL REFERENCES shelves(id), | |
UNIQUE(user_id, shelf_id) | |
); | |
INSERT INTO USER_shelves(user_id,shelf_id) SELECT shelves.user_id, shelves.id AS shelf_id FROM shelves | |
SELECT * FROM USER_shelves; |
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
# frozen_string_literal: true | |
require 'socket' | |
require 'time' | |
server = TCPServer.new 2000 # Server bound to port 2000 | |
def parse(request_string) | |
method, path, version = request_string.lines[0].split | |
{ |
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 LtiScoreSubmission | |
def initialize(assignment: , lis_result_sourced_id:, score: , lis_outcome_service_url: ) | |
@assignment = assignment | |
@lis_result_sourced_id = lis_result_sourced_id | |
@score = score | |
@lis_outcome_service_url = lis_outcome_service_url | |
@oauth_consumer_key = assignment.oauth_consumer_key | |
@lti_shared_secret = assignment.lti_shared_secret | |
end |