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
class UserService { | |
static transactional = true | |
void update(User user) { | |
// TODO: ... implement the logic ... | |
user.save(flush:true, failOnError:true) | |
} | |
} |
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
Template.googleAnalytics.rendered = function() { | |
new GA('UA-111-1', 'my-account-name'); | |
} | |
GA = function(code, account) { | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE module PUBLIC | |
"-//Google Inc.//DTD Google Web Toolkit 1.7.0//EN" | |
"http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro-source/core/src/gwt-module.dtd"> | |
<module> | |
<inherits name="com.vaadin.DefaultWidgetSet" /> | |
<inherits name="com.example.YourWidgetset" /> | |
</module> |
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
<template name='welcomePage'> | |
<a href="https://twitter.com/intent/tweet?screen_name=TemplHub" | |
class="twitter-mention-button" | |
data-related="TemplHub"> | |
Tweet to @TemplHub | |
</a> | |
</template> |
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
isProdEnv = function () { | |
if (process.env.ROOT_URL == "http://localhost:3000") { | |
return false; | |
} else { | |
return true; | |
} | |
} | |
Accounts.loginServiceConfiguration.remove({ | |
service: 'google' |
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
Template.welcomePage.events({ | |
'click #send-email-button': function () { | |
var email = { | |
to: 'xyz@failtracker.com', | |
from: 'abc@failtracker.com', | |
replyTo: 'abct@failtracker.com', | |
subject: "test email", | |
text: "hello lover boy" | |
}; | |
Meteor.call('sendEmail', this.userId, email); |
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 ch.qos.logback.classic.Level | |
import ch.qos.logback.classic.Logger | |
import ch.qos.logback.classic.LoggerContext | |
import ch.qos.logback.classic.encoder.PatternLayoutEncoder | |
import ch.qos.logback.classic.joran.JoranConfigurator | |
import ch.qos.logback.core.ConsoleAppender | |
import grails.util.Environment | |
import org.apache.commons.logging.Log | |
import org.apache.commons.logging.LogFactory | |
import org.slf4j.LoggerFactory; |
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
# install missing libraries (if any) | |
cd ~ | |
sudo yum update | |
yum install java-1.7.0-openjdk.x86_64 | |
yum install unzip | |
yum install mc | |
yum install wget | |
yum install curl | |
# get and unpack elasticsearch zip file |
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
Proven hints to follow when your pull request got too many negative comments: | |
1. say you will do it later | |
2. choose other reviewers and add your manager for official approval | |
3. decline it and create a new pull request, but rather try other reviewers |
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
PUT /_river/jdbc_river_1/_meta | |
{ | |
"type" : "jdbc", | |
"jdbc" : { | |
"url": "jdbc:mysql://localhost:3306/yourDb", | |
"user": "login", | |
"password": "pass", | |
"sql" : "SELECT * FROM Transactions WHERE user_id = 1", | |
"index" : "my_jdbc_index", | |
"type" : "my_jdbc_type", |
OlderNewer