This file contains hidden or 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/bash | |
colour=$1; shift | |
if test "$colour" == "" ; then | |
echo "Please provide a colour / tag name to search for." | |
exit 1 | |
fi | |
destination=$1; shift | |
if test "$folder" == "" ; then |
This file contains hidden or 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/bash | |
folder=$1; shift | |
if test "$folder" == "" ; then | |
echo "Please provide a folder containing music to re-encode." | |
exit 1 | |
fi | |
old_codec=${1:-alac} |
This file contains hidden or 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
import os | |
import time | |
import requests | |
def get_tokens(username, apikey): | |
# Get the auth token | |
auth_data = { | |
"auth": { | |
"RAX-KSKEY:apiKeyCredentials": { |
This file contains hidden or 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
import requests | |
import time | |
def get_tokens(username, apikey): | |
# Get the auth token | |
auth_data = { | |
"auth": { | |
"RAX-KSKEY:apiKeyCredentials": { | |
"username": username, | |
"apiKey": apikey |
This file contains hidden or 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
# Point =/ag.openPDF to eDetailing.openPDF if available. | |
sed -i '' -e "s/ag.openPDF=/ag.openPDF=window.eDetailing\&\&function(p){var l=window.parent.document.createElement('a');l.href=p;window.eDetailing.openPDF(l.href)}||/g" core.js spa.js | |
# Add logevent.js top index.html | |
grep logevent.js index.html -q | |
if [ $? == 1 ]; then | |
sed -i '' -e 's|</body>| <script src="../../support/logevent.js"></script>\ | |
&|' index.html | |
fi | |
# Add edetailing.js to all slides index.html | |
while read file; do |
This file contains hidden or 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
copy (SELECT name FROM reports_reportgroup JOIN reports_reportgroup_translation ON master_id = reports_reportgroup_translation.id AND language_code ='en-gb') to '/tmp/reports_reportgroup.csv' delimiter ',' csv header; | |
copy (SELECT name,description FROM reports_report JOIN reports_report_translation ON master_id = reports_report_translation.id AND language_code ='en-gb') to '/tmp/reports_report.csv' delimiter ',' csv header; | |
copy (SELECT name FROM reports_statistic JOIN reports_statistic_translation ON master_id = reports_statistic_translation.id AND language_code ='en-gb') to '/tmp/reports_statistic.csv' delimiter ',' csv header; | |
copy (SELECT name FROM objectives_objectivecategory JOIN objectives_objectivecategory_translation ON master_id = objectives_objectivecategory_translation.id AND language_code ='en-gb') to '/tmp/objectives_objectivecategory.csv' delimiter ',' csv header; | |
copy (SELECT name FROM objectives_tacticcategory JOIN objectives_tacticcategory_translation ON master_id = objectives_tacticcategory |
This file contains hidden or 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 | |
version=$1; shift | |
current=$(grep 'version=' ./setup.py | sed -e "s/^.*version='\([^']*\).*$/\1/") | |
if [[ "$version" == "" ]]; then | |
echo "$0: No versions specified. Current is $current" | |
exit 1 | |
fi |
This file contains hidden or 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
# Make sure your ~/.jamrc has the repo you are publishing to as the first entry. | |
# From the project folder conatianing jam packages | |
cd <jam-project>/project; | |
# publish each jam package | |
for dir in $(find jam -type d -depth 1); do (cd $dir; jam publish); done; |
This file contains hidden or 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 compare_json(first, second, keys=None): | |
if first == second: | |
return True | |
if keys is None: | |
keys = [] | |
def prefix(keys): | |
return '[{}]'.format(']['.join(keys)) |
This file contains hidden or 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
{ | |
"description": "A list of account structure nodes", | |
"url": "http://localhost:8000/api/accounts", | |
"OK": { | |
"status": 200, | |
"response_data": [ | |
{ | |
"name": "Zombotin", | |
"slug": "zombotin", | |
"level": 0, |