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
export GRAILS_HOME=/opt/grails-$1 | |
$GRAILS_HOME/bin/grails $2 | |
#exemple : runGrails 1.3.1 "-Dserver.port=8082 run-app" |
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/bash | |
for file in *.groovy | |
do | |
echo "Traitement de $file ..." | |
sed -e "s/string1/string2/g" "$file" > "$file".tmp && mv -f "$file".tmp "$file" | |
done |
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
GRANT ALL PRIVILEGES ON Base.* TO userId@'%' IDENTIFIED BY 'Password'; |
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 java.io.File; | |
import java.util.Vector; | |
/** | |
* Filter on the extension of the files. | |
* @author sprohaszka | |
* | |
*/ | |
public class FileExtFilter extends javax.swing.filechooser.FileFilter { |
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
HttpServletRequest httpRequest = (HttpServletRequest) renderRequest.getAttribute(PortletServlet.PORTLET_SERVLET_REQUEST); |
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
@implementation UIColor (RGB) | |
+ (UIColor*) colorIntWithRed:(int)red green:(int)green blue:(int)blue { | |
return [UIColor colorWithRed:red/255.0f green:green/255.0f blue:blue/255.0f alpha:1.0f]; | |
} | |
@end |
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
NSComparisonResult (^sortBlock)(id, id) = ^(id obj1, id obj2) { | |
// Objects have a name property | |
NSString* name1 = [obj1 name]; | |
NSString* name2 = [obj2 name]; | |
return [name1 caseInsensitiveCompare:name2]; | |
}; |
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
def countries | |
Locale.availableLocales.each { locale -> | |
String iso = locale.getISO3Country() | |
String code = locale.country | |
String name = locale.displayCountry | |
if (iso && code && name) { | |
Address.@countries += [iso: iso, code: code, name: name] | |
} |
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/bash | |
if [ $# -lt 2 ]; then | |
echo "OCLint generate by default a report.html files with all rules violation" | |
echo "This script requires that oclint, oclint-xcodebuild and ocline-json-compilation-database can be reached from your PATH" | |
echo "Usage $0 <workspace> <scheme>" | |
exit 0 | |
fi | |
xcodebuild -workspace $1 -sdk iphonesimulator6.1 -scheme $2 clean build | tee xcodebuild.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
xcodebuild -target "TARGET" -sdk iphoneos6.1 -scheme "SCHEME" CONFIGURATION_BUILD_DIR='temp/' clean build |
OlderNewer