next.js, nginx, reverse-proxy, ssl
$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt| <?php | |
| // Converts a number into a short version, eg: 1000 -> 1k | |
| // Based on: http://stackoverflow.com/a/4371114 | |
| function number_format_short( $n, $precision = 1 ) { | |
| if ($n < 900) { | |
| // 0 - 900 | |
| $n_format = number_format($n, $precision); | |
| $suffix = ''; | |
| } else if ($n < 900000) { |
| <?php | |
| // Include the SDK using the Composer autoloader | |
| date_default_timezone_set('America/Los_Angeles'); | |
| require 'vendor/autoload.php'; | |
| $s3 = new Aws\S3\S3Client([ | |
| 'version' => 'latest', | |
| 'region' => 'us-east-1', | |
| 'endpoint' => 'http://localhost:9000' | |
| ]); |
| //Authorization popup window code | |
| function ShowAuthWindow(options) | |
| { | |
| console.log('ee'); | |
| options.windowName = options.windowName || 'ConnectWithOAuth'; // should not include space for IE | |
| options.windowOptions = options.windowOptions || 'location=0,status=0,width=800,height=400'; | |
| options.callback = options.callback || function(){ window.location.reload(); }; | |
| var that = this; | |
| console.log(options.path); | |
| that._oauthWindow = window.open(options.path, options.windowName, options.windowOptions); |
| <html> | |
| <head> | |
| <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
| <link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" /> | |
| <title>API Maps v3: Multiple infoWindows and zoom issues</title> | |
| <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
| <script type="text/javascript"> | |
| var sites = [ | |
| ['Darlington', -35.0252820, 138.5630230, 1, 'Darlington, where I am living.<br/><a href="http://www.flickr.com/photos/rbochet/5560158585/" title="Figue agressive de Romain Bochet, sur Flickr"><img src="http://farm6.static.flickr.com/5030/5560158585_c9a6919140_m.jpg" width="240" height="160" alt="Figue agressive" /></a><br/>See my <a href="http://www.flickr.com/photos/rbochet/sets/72157625988396879/">Flickr album</a>'], |