Skip to content

Instantly share code, notes, and snippets.

# Add to /etc/bashrc to customise command prompt
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="(production) - \u@\[\e[1;31m\]myhost.com\[\e[0m\]:\w \\$ "
<!-- Tridion JSP template with contextual selection -->
<%@taglib prefix="context" uri="http://context.sdl.com/taglib" %>
<tcdl:if expression="os.model == 'Android'">
Would you like to try our new Android app?
- <a href=" ... google app store link ... ">download now</a>
</tcdl:if>
# Create SSH key - alternative to ssh-copy-id
export USER=me
export HOST=myhost.com
if [ ! -f ~/.ssh/${USER}_rsa ] ; then echo "Creating SSH key" ; ssh-keygen -t rsa -f ~/.ssh/${USER}_rsa -C "${USER} access" ; fi
cat ~/.ssh/${USER}_rsa.pub | ssh $USER@$HOST 'mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat - >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys'
cat >> ~/.ssh/config << EOF