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
log4j = { | |
appenders { | |
console name:'stdout', layout:pattern(conversionPattern: '[%r] %c{2} %m%n') | |
if (tools.error.email.to && Globals.getProperties().SMTP_HOST) { | |
def patternLayout = new org.apache.log4j.PatternLayout() | |
patternLayout.setConversionPattern("[%r] %c{2} %m%n") | |
def mailAppender = new org.apache.log4j.net.SMTPAppender() | |
mailAppender.setFrom("[email protected]") | |
mailAppender.setTo("${tools.error.email.to}") | |
mailAppender.setSubject("Grails Tools Application Error") |
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
dstarh:danger-danger-squared.local in [/usr/local/site/tools] rm -rf ~/.grails | |
dstarh:danger-danger-squared.local in [/usr/local/site/tools] |NUT-37-grails-2.1.4-java-7 ✗|$ grails install-plugin sublog --stacktrace | |
| Installed plugin sublog-0.5.3 | |
| Error Error executing script InstallPlugin: BUG! exception in phase 'conversion' in source unit 'Script1.groovy' No such property: importPackages for class: org.codehaus.groovy.ast.ModuleNode (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.) | |
BUG! exception in phase 'conversion' in source unit 'Script1.groovy' No such property: importPackages for class: org.codehaus.groovy.ast.ModuleNode | |
at org.codehaus.gant.IncludeTargets.leftShift(IncludeTargets.groovy:72) | |
at org.codehaus.gant.IncludeTargets$leftShift$0.call(Unknown Source) | |
at InstallPlugin$_run_closure8.doCall(InstallPlugin:246) | |
at InstallPlugin$_run_closure8.call(InstallPlugin) | |
at InstallPlugin$_run_closure14_closure29.doCall(InstallPlugin:337) |
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
foo | |
------- | |
foo_id | |
name | |
foo_hierarchy | |
------- | |
foo_child_id | |
foo_parent_id | |
id |
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
string pattern = @"[^ -~]"; | |
string input = THE XML STRING | |
string replacement = ""; | |
Regex rgx = new Regex(pattern); | |
string result = rgx.Replace(input, replacement); | |
Console.WriteLine("Original String: '{0}'", input); | |
Console.WriteLine("Replacement String: '{0}'", result); |
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 | |
echo -e "\033]50;SetProfile=$1\a" | |
/usr/bin/ssh $* | |
echo -e "\033]50;SetProfile=Default\a" |
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
#foo | |
#bar | |
#baz | |
renders | |
<div id="foo"> | |
<div id="bar"> | |
<div id="baz"> | |
</div> |
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
module X | |
def initialize(params ={}) | |
puts 'setting params in module x' | |
@foo = params[:foo] | |
end | |
end | |
module Y | |
def initialize(params ={}) | |
super if defined?(super) | |
puts 'setting params in module y' |
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 smtpd | |
import asyncore | |
server = smtpd.DebuggingServer(('127.0.0.1', 1025), None) | |
asyncore.loop() |
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
/var/log/syslog | |
{ | |
maxage 36500 | |
daily | |
missingok | |
ifempty | |
delaycompress | |
compress | |
dateext | |
extension log |
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
server { | |
listen 8081; | |
server_name whatever.com; | |
#charset koi8-r; | |
#access_log logs/host.access.log main; | |
#location / { | |
# root html; |