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 com.vividsolutions.jts.geom.Coordinate; | |
import com.vividsolutions.jts.geom.GeometryFactory; | |
import com.vividsolutions.jts.geom.LineString; | |
import com.vividsolutions.jts.geom.Point; | |
import com.vividsolutions.jts.geom.PrecisionModel; | |
public class GeometriesFactory { | |
private static GeometryFactory factory4326 = new GeometryFactory(new PrecisionModel(PrecisionModel.FLOATING), 4326); |
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 internetcon; | |
import java.io.IOException; | |
import java.net.InetSocketAddress; | |
import java.net.Socket; | |
public class CheckInternet { | |
public static void main(String[] args) { | |
System.out.println( | |
"Online: " + |
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 | |
# | |
# Backup local databases to Amazon S3. | |
# | |
# This script takes a single argument: an S3 bucket name with optional path. | |
# | |
# Usage: | |
# database-backup.sh backup.example.com | |
# database-backup.sh backup.example.com/some/path | |
# |
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
# Systemd unit file for tomcat | |
[Unit] | |
Description=Apache Tomcat Web Application Container | |
After=syslog.target network.target | |
[Service] | |
Type=forking | |
ExecStart=/opt/apache-tomcat-8.5.23/bin/catalina.sh start | |
ExecStop=/opt/apache-tomcat-8.5.23/bin/catalina.sh stop |
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 | |
#title :wildfly-install.sh | |
#description :The script to install Wildfly 11.x | |
#more :http://sukharevd.net/wildfly-8-installation.html | |
#author :Dmitriy Sukharev | |
#date :2016-06-18T02:45-0700 | |
#usage :/bin/bash wildfly-install.sh | |
#tested-version1 :10.0.0.CR3 | |
#tested-distros1 :Ubuntu 15.10; Debian 7,8; CentOS 7; Fedora 22 | |
#tested-version2 :10.0.0.Final |
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
public class AccountAuthenticator extends AbstractAccountAuthenticator { | |
private final Context context; | |
@Inject @ClientId String clientId; | |
@Inject @ClientSecret String clientSecret; | |
@Inject ApiService apiService; | |
public AccountAuthenticator(Context context) { | |
super(context); |
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 | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
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 com.ingartek.transporte.estimat.configuration; | |
import java.util.HashMap; | |
import java.util.Map; | |
import javax.sql.DataSource; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.annotation.Autowired; |
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
#rest of the file ... | |
elif [ "$1" = "configtest" ] ; then | |
eval "\"$_RUNJAVA\"" $LOGGING_MANAGER $JAVA_OPTS \ | |
-classpath "\"$CLASSPATH\"" \ | |
-Dcatalina.base="\"$CATALINA_BASE\"" \ | |
-Dcatalina.home="\"$CATALINA_HOME\"" \ | |
-Djava.io.tmpdir="\"$CATALINA_TMPDIR\"" \ | |
org.apache.catalina.startup.Bootstrap configtest |
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.Optional; | |
import org.springframework.stereotype.Component; | |
@Component | |
public class SpringResourceFileLoader { | |
/** | |
* Obtiene un fichero desde el directorio resources |
OlderNewer