ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install yaz
yaz-client will then be available and you can use it like this:
run the program and you get a Z> prompt.
for container in `docker ps -q`; do | |
# show the name of the container | |
docker inspect --format='{{.Name}}' $container; | |
# run the command (date in the case) | |
docker exec -it $container date; | |
done |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install yaz
yaz-client will then be available and you can use it like this:
run the program and you get a Z> prompt.
# if using zsh you need to get the strftime function to be available | |
zmodload zsh/datetime | |
# We're using bash version 4 range expansion | |
# to generate number of seconds between the 10th day of each month since unix epoch time `0` | |
# - we use the 10th day to miss months of unequal length | |
# - we start from 0 seconds. Every year since 1970 has had the same number of months. | |
# We then pass those seconds to strftime to build our dirname | |
# which is then used to create the directory | |
for seconds in {864000..31556952..2629746} |
#!/bin/bash | |
# quote meta characters | |
python -c "import sys,re; [sys.stdout.write(re.escape(line)) for line in sys.stdin]" < <(echo -n "$1") |
# Utility called csvfix https://bitbucket.org/neilb/csvfix | |
# first pick the two columns we are interested in - list link, and hierarchy link. | |
# then split the hierarchy link (which is now colomn 2) on the semi-colon SPACE that is used to delimit. | |
# then unflatten - i.e. make a record(row) with the first column as key and each of the split columns as value. | |
# e.g. | |
# <key>,<val1>,<val2>,<val3> | |
# becomes | |
# <key>,<val1> | |
# <key>,<val2> |
# uses aws cli to lookup instances based on a filter on the Name tag | |
# $1 is the profile to use | |
# $2 is the filter to use | |
# $3 is optional, the value doesn't matter but if passed in will result | |
# in this function printing out the raw command its about to run | |
# for debugging purposes | |
awslookup() { | |
cmd="aws --profile $1 ec2 describe-instances --filters \"Name=tag:Name,Values=$2\" --query 'Reservations[].Instances[].[InstanceId,PublicDnsName,PrivateDnsName,State.Name,InstanceType,join(\`,\`,Tags[?Key==\`Name\`].Value)]' --output table" | |
if [ $# -eq 3 ] | |
then |
# for each line read of the file | |
while read line | |
do | |
echo "$line" | |
done < input_file.txt |
/** | |
* Basic IIFE construction is like this. | |
*/ | |
(function () { console.log('hello world')})(); | |
/** | |
* Basic IIFE which passes in the jQuery object as the $ symbol. | |
*/ | |
(function ($) { $('div.classname')})(jQuery); |
<div id="tarlSearchBox"> | |
<h2 id="tarlSearchTitle">Search for reading lists by module name</h2> | |
<p id="tarlSearchDescription"></p> | |
<form id="tarlSearch" method="get" action="https://{{tenantShortCode}}.rl.talis.com/search.html"> | |
<div> | |
<label for="q" class="invisible sr-only">Search</label> | |
<input id="q" type="text" name="q" size="50" maxlength="1000"> | |
<input id="tarlBtnSearch" type="submit" value="Search"> | |
</div> | |
</form> |
<?xml version="1.0" encoding="UTF-8"?> | |
<basic_lti_link xmlns="http://www.imsglobal.org/xsd/imsbasiclti_v1p0" | |
xmlns:lticm ="http://www.imsglobal.org/xsd/imslticm_v1p0" | |
xmlns:lticp ="http://www.imsglobal.org/xsd/imslticp_v1p0" | |
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation = "http://www.imsglobal.org/xsd/imsbasiclti_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imsbasiclti_v1p0.xsd | |
http://www.imsglobal.org/xsd/imslticm_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticm_v1p0.xsd | |
http://www.imsglobal.org/xsd/imslticp_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticp_v1p0.xsd"> | |
<title>Talis Reading Lists</title> | |
<description>Talis Aspire Reading Lists LTI Integration</description> |