This file contains hidden or 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
// Adapted from https://gist.github.com/int128/e47217bebdb4c402b2ffa7cc199307ba | |
package com.elvtn.logging; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.http.HttpStatus; | |
import org.springframework.http.MediaType; | |
import org.springframework.jmx.export.annotation.ManagedOperation; | |
import org.springframework.jmx.export.annotation.ManagedResource; |
This file contains hidden or 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
<?php | |
/** | |
* Please see single-event.php in this directory for detailed instructions on how to use and modify these templates. | |
* | |
* Override this template in your own theme by creating a file at: | |
* | |
* [your-theme]/tribe-events/month/tooltip.php | |
* @version 4.6.21 | |
*/ | |
?> |
This file contains hidden or 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
<?php | |
// Define default values to protect against events not having tickets | |
$additional_data = array(); | |
$additional_data['price'] = ""; | |
$additional_data['stock'] = ""; | |
// Get ticket prices and quantity; this works specifically for WooCommerce | |
// tickets only and will need to be changed if you use other types such | |
// as RSVP tickets. | |
if ( class_exists('Tribe__Tickets_Plus__Commerce__WooCommerce__Main') ) |
This file contains hidden or 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 com.elvtn | |
import org.gradle.api.Plugin | |
import org.gradle.api.Project | |
/** | |
* Custom plugin that adds a new <code>bootDeploy</code> task for any | |
* project that depends on the Spring Boot gradle plugin. This new task | |
* depends on the existing <code>bootJar</code> task, and adds some new |
This file contains hidden or 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 com.myorg; | |
import com.netflix.appinfo.ApplicationInfoManager; | |
import com.netflix.appinfo.InstanceInfo; | |
import com.netflix.discovery.AbstractDiscoveryClientOptionalArgs; | |
import com.netflix.discovery.DiscoveryClient; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; |
This file contains hidden or 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
@Configuration | |
public class SystemHealthIndicator | |
{ | |
@Bean | |
public SystemHealthIndicator systemHealthIndicator() | |
{ | |
return new SystemHealthIndicator(); | |
} | |
/** |
This file contains hidden or 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.net.InetAddress; | |
import java.net.NetworkInterface; | |
import java.net.SocketException; | |
import java.util.*; | |
/** | |
* Test app to show DNS resolution times for IP -> hostname. | |
*/ | |
public class InetTester | |
{ |
This file contains hidden or 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 unirest = require('unirest'); | |
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var app = express(); | |
app.use(bodyParser.json()); | |
app.set('port', (process.env.PORT || 5000)); | |
// Replace these with your own tokens |