- Using the devel module
- Look at what tuque is doing
- Look at code and look at how it is on the site
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
$ rsync -a -v -z --include='*/' --include='*.xml' --exclude='*' user@server:/path/to/files/ local/path/to/wherever/ | |
# -a = recursive, timestamps, etc, etc | |
# -v = verbose (not really necessary, but why not?) | |
# -z = compression because we can! | |
# --include='*/' = include all directories! | |
# --include='*.xml' = include this kind of file, wherever they occur in those directories! | |
# --exclude='*' = exclude everything *but* the stuff we're including! | |
# you know the rest |
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/bash | |
echo "drush enable theme" | |
sudo chown -hR vagrant:www-data "$DRUPAL_HOME"/sites/all/themes | |
sudo chmod -R 755 "$DRUPAL_HOME"/sites/all/themes | |
cd "$DRUPAL_HOME"/sites/all/themes || exit | |
git clone https://github.com/utkdigitalinitiatives/UTKdrupal | |
drush -y -u 1 en pm-enable UTKdrupal | |
#drush -y -u 1 en vset theme_default UTKdrupal |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
gem 'blacklight', '>= 6.3' | |
gem 'geoblacklight', '>= 1.3' | |
gem 'jettywrapper', '>=2.0.4' | |
run 'bundle install' | |
generate 'blacklight:install', '--devise' | |
generate 'geoblacklight:install', '-f' | |
rake 'db:migrate' |
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/bash | |
exec java -cp /home/mark/opt/saxon9/saxon9he.jar net.sf.saxon.Transform "$@" |
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/bash | |
for X in *.xml; do sed -i_BAK -e 's/\ xlink=/ xlink:href=/g' $X; done |
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
import os | |
from subprocess import call | |
path = "XSLT" | |
for x in os.listdir(path): | |
if x != x.lower(): | |
file = x.lower() | |
call(f"git mv {path}/{x} {path}/{file}", shell=True) |
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
pipenv lock --pre --clear |
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 replace_double_commas_in_archival_object(self, id, repo_id=2): | |
metadata_from_archival_object = self.get_archival_object(id, repo_id) | |
title = metadata_from_archival_object['title'] | |
if title.endswith(','): | |
title = title[:-1] | |
metadata_from_archival_object['title'] = title | |
r = requests.post( | |
url=f'{self.base_url}/repositories/{repo_id}/archival_objects/{id}', | |
headers=self.headers, | |
data=json.dumps(metadata_from_archival_object) |
OlderNewer