View build.gradle
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
apply plugin: 'java' | |
version = '1.0.0-SNAPSHOT' | |
// In this section you declare where to find the dependencies of your project | |
repositories { | |
// Use jcenter for resolving your dependencies. | |
// You can declare any Maven/Ivy/file repository here. | |
jcenter() | |
} |
View neo4j-conf-sdn.java
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
@EnableAutoConfiguration | |
@Configuration | |
@EnableTransactionManagement | |
@ComponentScan(basePackages = {"com.enernoc.yggi.neo4j.service"}) | |
@EnableNeo4jRepositories(basePackages = "com.enernoc.yggi.neo4j.repository") | |
@EnableConfigurationProperties(ConfigProperties.class) | |
public class MyNeo4jConfiguration extends WebMvcConfigurerAdapter { | |
private static final Logger LOG = LoggerFactory.getLogger(MyNeo4jConfiguration.class); |
View snsToSlack.js
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 https = require('https'); | |
var util = require('util'); | |
var CHANNEL = "#aws-sns"; | |
var PATH = "/services/your-slack-webhook-url-info-goes-here"; | |
exports.handler = function(event, context) { | |
console.log(JSON.stringify(event, null, 2)); | |
console.log('From SNS:', event.Records[0].Sns.Message); |
View concurrency.go
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 main | |
import ( | |
"fmt" | |
"net/http" | |
"sync" | |
"time" | |
) | |
type result struct { |
View guestbook.yml
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: redis-master | |
labels: | |
app: redis | |
tier: backend | |
role: master | |
spec: | |
ports: |
View simplejob.yaml
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
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: finalcountdown | |
spec: | |
template: | |
metadata: | |
name: finalcountdown | |
spec: | |
containers: |
View cronjob.yaml
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
apiVersion: batch/v1beta1 | |
kind: CronJob | |
metadata: | |
name: hellocron | |
spec: | |
schedule: "*/1 * * * *" #Runs every minute (cron syntax) or @hourly. | |
jobTemplate: | |
spec: | |
template: | |
spec: |