Skip to content

Instantly share code, notes, and snippets.


Tim Levett timlevett

View GitHub Profile
View open-drive-files-in-new-tabs.js
javascript:(() => {
/* originally copied from */
var as = document.getElementsByClassName("external-link");
for(var i = 0; i < as.length; i++) {
&& as[i].href.indexOf('drive') != -1
&& as[i].href.indexOf('open') != -1) {
console.log(as[i].href);[i].href, "_blank");
if [ $# -lt 4 ]; then
echo "USAGE : ./ <org> <auth-key> <team name> <temp_dir abs path>"
exit -1;
alias dforce='docker service update --force --with-registry-auth --detach'
alias dupdate='dforce'
alias dlogs='docker service logs -f'
alias dps='docker service ps'
alias dls='docker service ls'
alias dscale='docker service scale'
alias dnode='docker node'
alias ddrain='dnode update --availability=drain'
alias dactive='dnode update --availability=active'
alias dpause='dnode update --availability=pause'
timlevett /
Last active Aug 23, 2016
How one switches skin in bucky

If a user is on uportal and wanted to change the skin do the following.

Lookup the skin key in the skinList.xml

THen when on a maximized url in portal, open up your dev console and run

up.jQuery.ajax({url:'/portal/api/layout?action=chooseSkin&skinName=uwExtension', method: 'POST'});

Replacing uwExtension with the skin key you want.

View plugin-pom.xml
View cli-1.0.0-beta.5.log
levett@timtim:~/projects/test-a2-cli $ ng --version
Could not start watchman; falling back to NodeWatcher for file system events.
Visit for more info.
angular-cli: local (v1.0.0-beta.5, branch: master)
node: 5.5.0
os: linux x64
levett@timtim:~/projects/test-a2-cli $ ng init
Could not start watchman; falling back to NodeWatcher for file system events.
Visit for more info.
installing ng2
View override.js
define(['angular'], function(angular) {
/*Keep in sync with docs/mardown/*/
var config = angular.module('override', []);
//see for howto
.constant('OVERRIDE', {
'NAMES' : {
'title': 'alt-title'
timlevett /
Last active Oct 29, 2015
MyUW : Outage and maintenance


The task at hand is to come up with a way to flag an application for an outage when MyUW is not down. If MyUW as a whole is down then they will be presented with the generic MyUW error page which is in place under /portal/500.html currently.

Solution 1

So right now the way people get into our MyUW applications is through /web. Which is handled by our layout manager. In uPortal 4.2 they introduced a life cycle of maintenance ( We could just flag the proper entity file for maintenance, and in the tomcat manager shut down the webapp. That should prevent people from seeing the application. Then if they deep link to it, it would show the 404 page which should suggest they go to / to find what they are looking for. That could be a simple enough solution if a single app goes down when MyUW is still up. This seems to happen very rarely. We may have to tweak the /web/ to deal with things in a maintenance state.

Solution 2

timlevett /
Last active Dec 2, 2015
Project static : a uw-frame review


I took some time during research day to evaluate uw-frame as a maven project. Many times we have said "why is this a maven project, it is just static content". I took that good point, and ran with it. What if frame was just static content.

Steps Taken for Test