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
/** | |
* Displays overlay with "Please wait" text. Based on bootstrap modal. Contains animated progress bar. | |
*/ | |
function showPleaseWait() { | |
if (document.querySelector("#pleaseWaitDialog") == null) { | |
var modalLoading = '<div class="modal" id="pleaseWaitDialog" data-backdrop="static" data-keyboard="false" role="dialog">\ | |
<div class="modal-dialog">\ | |
<div class="modal-content">\ | |
<div class="modal-header">\ | |
<h4 class="modal-title">Please wait...</h4>\ |
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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
# Default route for Laravel projects | |
root /var/www/html/public; | |
# Add index.php to the list if you are using PHP | |
index index.html index.htm index.php; |
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
private static Unit getMineralFieldToGather(Unit worker) { | |
// Get nearest base for this unit | |
Unit base = Select.ourBases().nearestTo(worker.getPosition()); | |
if (base == null) { | |
return null; | |
} | |
// Get minerals near to our main base and sort them from closest to most distant one | |
List<Unit> minerals = (List<Unit>) Select.minerals().inRadius(12, base.getPosition()).listUnits(); |
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 | |
###################################################### | |
### README ########################################### | |
###################################################### | |
### | |
### One-line server install script for Ubuntu. | |
### Installs Nginx + PHP5.6 + MongoDB for PHP driver. | |
### | |
### Removes previous Apache, PHP, nginx installations. |
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 | |
###################################################### | |
### README ########################################### | |
###################################################### | |
### | |
### One-line Laravel Homestead MongoDB driver PHP installer. | |
### | |
### What it does: | |
### - installs some MongoDB PHP driver dependencies |
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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
# SSL configuration | |
# | |
# listen 443 ssl default_server; | |
# listen [::]:443 ssl default_server; | |
# | |
# Note: You should disable gzip for SSL traffic. |
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 | |
###################################################### | |
### README ########################################### | |
###################################################### | |
### | |
### One-line server install script for Ubuntu. | |
### Installs Nginx + PHP7.1 + MongoDB for PHP driver. | |
### | |
### Removes previous Apache, PHP, nginx installations. |
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
[program:laravel-worker] | |
process_name=%(program_name)s_%(process_num)02d | |
command=php /var/www/html/artisan queue:work database --sleep=3 --tries=3 | |
autostart=true | |
autorestart=true | |
user=ubuntu | |
numprocs=10 | |
redirect_stderr=true | |
stdout_logfile=/var/www/html/worker.log |
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
<?php | |
namespace Jenssegers\Mongodb\Auth; | |
use DateTime; | |
use DateTimeZone; | |
use Illuminate\Auth\Passwords\DatabaseTokenRepository as BaseDatabaseTokenRepository; | |
use MongoDB\BSON\UTCDateTime; | |
class DatabaseTokenRepository extends BaseDatabaseTokenRepository { |
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
// See example: https://image.prntscr.com/image/cTIv8JkLR7yWEQxVev9SyA.jpeg | |
function numberToColor($value, $min, $max, $gradientColors = null) | |
{ | |
// Ensure value is in range | |
if ($value < $min) { | |
$value = $min; | |
} | |
if ($value > $max) { | |
$value = $max; |
OlderNewer