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
var _ = require('underscore'); | |
// get the existing skin from /api/ui/skin/variables and change the wrapping object to module.exports | |
// this could be done cleaner in code but isn't worth the time right now | |
var skin = require('./saved.skin.json').results; | |
var ported = {}; | |
_.each(_.flatten(_.pluck(_.flatten(_.pluck(skin, 'subsections')), 'variables')), function(obj) { | |
if (obj.value !== undefined) { | |
ported['oae-ui/skin/variables/' + obj.name] = obj.value; |
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
{ | |
"status":[ | |
{ | |
"timestamp":"1393343949428", | |
"courseId":"6612", | |
"assignmentId":"2", | |
"revision":"rev:t:eklHzQVMot", | |
"d2lFeedback":{ | |
"Files":[], | |
"Score":null, |
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
# enable programmable completion features (you don't need to enable | |
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile | |
# sources /etc/bash.bashrc). | |
if [ -f /etc/bash_completion ]; then | |
. /etc/bash_completion | |
fi | |
hostnam=$(hostname) | |
usernam=$(whoami) | |
temp="$(tty)" |
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/sh | |
# Delete all cassandra data | |
cassandra-cli << EOF | |
drop keyspace oae; | |
EOF | |
# Delete all redis data | |
redis-cli << EOF | |
flushall |
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
var kc = require('./node/KalturaClient'); | |
var ktypes = require('./node/KalturaTypes'); | |
var partnerId = 1111111; | |
var adminSecret = 'secret'; | |
var conf = new kc.KalturaConfiguration(partnerId); | |
var client = new kc.KalturaClient(conf); | |
client.session.start(function(session){ | |
client.setKs(session); |
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
#!/usr/bin/env ruby | |
require 'erb' | |
require 'ostruct' | |
require 'json' | |
namespace = OpenStruct.new | |
namespace.nginxConf = OpenStruct.new(JSON.parse(IO.read('nginx.json'))) | |
template = IO.read('nginx.conf') | |
puts ERB.new(template).result(namespace.instance_eval { binding }) |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'nokogiri' | |
require 'getopt/long' | |
@opt = Getopt::Long.getopts( | |
["--file", "-f", Getopt::REQUIRED], | |
["--artifact", "-a", Getopt::OPTIONAL], | |
["--expected", "-e", Getopt::OPTIONAL], |
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
BRANCHNAME=$(basename $(git rev-parse --symbolic-full-name HEAD)) | |
if grep -qi '^SAKIII' << EOF | |
$BRANCHNAME | |
EOF | |
then | |
sed -i "1i\ | |
$BRANCHNAME" $1 | |
fi |
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
cXML = "" | |
components = 'sakai2-demo/components/sakai-provider-pack/WEB-INF/components.xml' | |
File.open(components) do |f| | |
cXML = REXML::Document.new(f) | |
beans = REXML::XPath.first(cXML, '//beans') | |
bean = beans.add_element("bean", { | |
"id" => "org.sakaiproject.user.api.UserDirectoryProvider", | |
"class" => "org.sakaiproject.provider.user.NakamuraUserDirectoryProvider", | |
"init-method" => "init" | |
}) |
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 enableInPortal(path, server) | |
json = "" | |
c = Curl::Easy.new("#{server}/#{path}") | |
if c.http_get | |
json = JSON.parse(c.body_str) | |
json["personalportal"] = true | |
postJsonAsFile(path, json.to_s(), server) | |
end | |
end |
NewerOlder