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
JDBC_DATABASE_URL=jdbc:postgresql://localhost:5432/database_name | |
JDBC_DATABASE_USERNAME=postgres | |
JDBC_DATABASE_PASSWORD=postgres |
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
heroku plugins:install heroku-cli-deploy | |
mvn clean package | |
heroku deploy:jar target/heroku-demo-0.0.1-SNAPSHOT.jar --app <APP-NAME> | |
heroku logs --tail --app <APP-NAME> |
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
public class App { | |
public static void main(String[] args) { | |
String string1 = "string1"; | |
String string2 = "string2"; | |
String checksum = DigestUtils | |
.sha1Hex(String.valueOf((string1.length() + DigestUtils.md5Hex(string2).length()))); | |
System.out.println("string1 = " + string1); |
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
public class Helper { | |
public static ResponseEntity<?> createResponse(boolean success, Object data, String message, HttpStatus code) { | |
HashMap<String, Object> response = new HashMap<>(); | |
response.put("success", success); | |
response.put("data", data); | |
response.put("message", message); | |
response.put("code", code); |
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
spring.datasource.url=${JDBC_DATABASE_URL} | |
spring.datasource.username=${JDBC_DATABASE_USERNAME} | |
spring.datasource.password=${JDBC_DATABASE_PASSWORD} | |
spring.jpa.show-sql=false | |
spring.jpa.generate-ddl=true | |
spring.jpa.hibernate.ddl-auto=create |
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
public void printClientInfo(HttpServletRequest request) { | |
final String referer = getReferer(request); | |
final String fullURL = getFullURL(request); | |
final String clientIpAddr = getClientIpAddr(request); | |
final String clientOS = getClientOS(request); | |
final String clientBrowser = getClientBrowser(request); | |
final String userAgent = getUserAgent(request); | |
logger.info("\n" + |
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 artisan cache:clear | |
php artisan view:clear | |
php artisan config:cache |
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
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' IDENTIFIED BY 'password'; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Top Github Users</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cosmo/bootstrap.min.css"> | |
<style id="jsbin-css"> | |
.loading { |
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
$.ajax({ | |
url: '', | |
data: { | |
format: 'json' | |
}, | |
error: function() { | |
console.log('error'); | |
}, | |
dataType: 'json', | |
success: function(data) { |
NewerOlder