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 fs = require("fs") | |
| var ssl_options = { | |
| key: fs.readFileSync('privatekey.pem'), | |
| cert: fs.readFileSync('certificate.pem') | |
| }; | |
| var port = process.env.PORT || 3000; | |
| var express = require('express'); | |
| var ejs = require('ejs'); | |
| var passport = require('passport') |
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
| #!/usr/bin/env python | |
| import os | |
| import signal | |
| import time | |
| # Reference: | |
| # https://stackoverflow.com/questions/18499497/how-to-process-sigterm-signal-gracefully | |
| # What signals to catch? | |
| # $ kill -l | |
| # 2) SIGINT 3) SIGQUIT 15) SIGTERM |
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
| /opt/nginx/logs/*.log { | |
| daily | |
| missingok | |
| rotate 52 | |
| compress | |
| delaycompress | |
| notifempty | |
| create 640 root adm | |
| sharedscripts | |
| postrotate |
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
| <a href="https://drive.google.com/uc?export=view&id=XXX"><img src="https://drive.google.com/uc?export=view&id=XXX" style="width: 500px; max-width: 100%; height: auto" title="Click for the larger version." /></a> |
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
| @OnClick(R.id.fabupload) | |
| public void upload(){ | |
| Toast.makeText(MainActivity.this, "click", Toast.LENGTH_SHORT).show(); | |
| RequestBody requestBody = new MultipartBody.Builder() | |
| .setType(MultipartBody.FORM) | |
| .addFormDataPart("title", "Square Logo") | |
| .addFormDataPart("image0","upload", |