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
#!/usr/bin/python | |
from BeautifulSoup import BeautifulSoup | |
import sys | |
soup = BeautifulSoup(sys.stdin.read()) | |
print soup.prettify() |
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
# Fix bug talked about at http://news.ycombinator.com/item?id=2418726 | |
# Tested on zsh. Paste the two following functions in your .zshrc. | |
# Customise the case switch to suit your own colour/host combos | |
function tabc { | |
osascript -e "tell application \"Terminal\" to set current settings of $1 to settings set \"$2\"" | |
} |
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
# Paste into .zshrc | |
function dcommit { | |
git commit -am "$@" && git svn dcommit; | |
} |
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
http://repo.grails.org/grails/plugins: no latest strategy defined: using default | |
http://repo.grails.org/grails/plugins: no resource found for org/codehaus/groovy#groovy;[1.5,1.7.99]: pattern=http://repo.grails.org/grails/plugins/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext] | |
trying http://repo.grails.org/grails/plugins/org/codehaus/groovy/groovy/[1.5,1.7.99]/groovy-[1.5,1.7.99].jar | |
tried http://repo.grails.org/grails/plugins/org/codehaus/groovy/groovy/[1.5,1.7.99]/groovy-[1.5,1.7.99].jar | |
HTTP response status: 404 url=http://repo.grails.org/grails/plugins/org/codehaus/groovy/groovy/%5B1.5,1.7.99%5D/groovy-%5B1.5,1.7.99%5D.jar | |
CLIENT ERROR: Not Found url=http://repo.grails.org/grails/plugins/org/codehaus/groovy/groovy/%5B1.5,1.7.99%5D/groovy-%5B1.5,1.7.99%5D.jar | |
tried http://repo.grails.org/grails/plugins/org/codehaus/groovy/groovy/[revision]/groovy-[revision].jar | |
maven-metadata not available: http://repo.grails.org/grails/plugins/org/codehaus/groovy/groovy/maven-metadata. |
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
# If you have an svn install lying around, you can make git svn work without needing to reinstall xcode | |
$ locate SVN/Core.pm | |
/opt/subversion/lib/svn-perl/SVN/Core.pm | |
/opt/subversion_backup.03232012154503/lib/svn-perl/SVN/Core.pm | |
$ export PERL5LIB=/opt/subversion/lib/svn-perl/ |
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/sh | |
#Usage: coordinates.sh foo.txt | |
# realpath function from http://stackoverflow.com/questions/3572030/bash-script-absolute-path-with-osx | |
USER=`whoami` | |
IP=`ifconfig en0 inet | grep "inet" | awk -F\ '{print $2}'` | |
realpath() { |
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
Property 'sessionFactory' threw exception; nested exception is java.lang.NullPointerException | |
org.springframework.beans.MethodInvocationException: Property 'sessionFactory' threw exception; nested exception is java.lang.NullPointerException | |
at grails.plugin.spock.IntegrationSpec.setupSpec(IntegrationSpec.groovy:47) | |
Caused by: java.lang.NullPointerException | |
... 1 more |
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
package g242 | |
import grails.converters.JSON | |
class PersonController { | |
def testPost(Person person){ | |
log.debug "JSONning ${person}" | |
render person as JSON | |
} |
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
package com.example.siwebfluxvalidationdemo | |
import groovy.transform.ToString | |
import org.reactivestreams.Publisher | |
import org.springframework.beans.factory.annotation.Autowired | |
import org.springframework.context.annotation.Bean | |
import org.springframework.context.annotation.Configuration | |
import org.springframework.core.ResolvableType | |
import org.springframework.http.HttpMethod | |
import org.springframework.http.MediaType |
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
strip-extension(){ | |
echo $1| rev | cut -d. -f2 | rev | |
} | |
create-stack(){ | |
TEMPLATE_FILE=$1 | |
shift 1; | |
aws cloudformation create-stack --stack-name \ | |
"$(strip-extension $TEMPLATE_FILE)" \ | |
--template-body file://${TEMPLATE_FILE} "$@" |
OlderNewer