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
<tr th:each="obj : ${objects}" th:fragment="row" th:attr="data-obj-id=${obj.id}"> | |
<td th:attr="data-obj-id=${obj.id}" th:text="${obj.id}> </td> | |
</tr> |
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
Problem: Virgin common runs apt-get update, writes a file named apt-get.updated, but it only runs apt-get update once, if apt-get-updated does not exist | |
It only runs apt-get update then installs a list of packages |
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
/* ******************************************* | |
// LICENSE INFORMATION | |
// The code, "Detecting Smartphones Using PHP" | |
// by Anthony Hand, is licensed under a Creative Commons | |
// Attribution 3.0 United States License. | |
// | |
// Updated 01 March 2010 by Bryan J Swift | |
// - Remove un-needed if statements instead just returning the boolean | |
// inside the if clause | |
// |
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("errors@email.com") | |
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' |
NewerOlder