Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim Levett timlevett

View GitHub Profile
View open-drive-files-in-new-tabs.js
javascript:(() => {
/* originally copied from https://gist.github.com/timlevett/29ae591153ea6a8aa61cc2f6e760bac0 */
var as = document.getElementsByClassName("external-link");
for(var i = 0; i < as.length; i++) {
if(as[i].href
&& as[i].href.indexOf('drive') != -1
&& as[i].href.indexOf('open') != -1) {
console.log(as[i].href);
window.open(as[i].href, "_blank");
}
View fetch-team-open-pr.sh
#!/bin/bash
if [ $# -lt 4 ]; then
echo "USAGE : ./github-fetch-all-teams-open-pr.sh <org> <auth-key> <team name> <temp_dir abs path>"
exit -1;
fi
ORG=$1
AUTH_KEY=$2
TEAM=$3
View docker-alias.sh
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
timlevett / switch-skin.md
Last active Aug 23, 2016
How one switches skin in bucky
View switch-skin.md

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
<profiles>
<profile>
<id>ear-deploy</id>
<build>
<plugins>
<plugin>
<groupId>org.jasig.portal.maven</groupId>
<artifactId>uportal-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
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 http://ember-cli.com/user-guide/#watchman 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 http://ember-cli.com/user-guide/#watchman for more info.
installing ng2
View override.js
define(['angular'], function(angular) {
/*Keep in sync with docs/mardown/configuration.md*/
var config = angular.module('override', []);
config
//see configuration.md for howto
.constant('OVERRIDE', {
'NAMES' : {
'title': 'alt-title'
@timlevett
timlevett / doc.md
Last active Oct 29, 2015
MyUW : Outage and maintenance
View doc.md

Introduction

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 (https://github.com/Jasig/uPortal/pull/397). 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
timlevett / steps-took.md
Last active Dec 2, 2015
Project static : a uw-frame review
View steps-took.md

Summary

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