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
# curl not smart enough for ipv6, so force ipv4 | |
# on my mac I started to get localhost connect failure | |
# | |
# curl: (7) Failed to connect to localhost port 9031: Connection refused | |
echo '--ipv4' >> ~/.curlrc |
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
# -c => Continue after error | |
ldapadd -c -x -W -D "cn=admin,dc=id,dc=sdl,dc=com" -f id_test_data.ldif |
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
ack needle |
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
find . -name "*.jar" -exec unzip -p {} META-INF/MANIFEST.MF \; | grep Implementation |
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
# Add to /etc/bashrc to customise command prompt | |
[ "$PS1" = "\\s-\\v\\\$ " ] && PS1="(production) - \u@\[\e[1;31m\]myhost.com\[\e[0m\]:\w \\$ " |
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
<!-- 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> |
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
# 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 |
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 groovy.text.SimpleTemplateEngine | |
class Message() { | |
String body | |
String populateBodyWith(binding) { | |
new SimpleTemplateEngine().createTemplate(body).make(binding.withDefault { '${' + it + '}' }) | |
} | |
} |
NewerOlder