🧘♂️
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
use Monolog\Logger; | |
use Monolog\Handler\StreamHandler; | |
use Monolog\Formatter\LineFormatter; | |
use Monolog\Formatter\JsonFormatter; | |
Route::get('/test', function() { | |
$user_info = [ | |
'request_time' => date('Y-m-d H:m:i'), | |
'request_url' => $request->url(), |
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
<canvas id="myCanvas" width="720" height="379" style="border:1px solid"></canvas> | |
function wrapText(context, text, x, y, maxWidth, lineHeight) { | |
var words = text.split(' '); | |
var line = ''; | |
for (var n = 0; n < words.length; n++) { | |
var testLine = line + words[n] + ' '; | |
var metrics = context.measureText(testLine); | |
var testWidth = metrics.width; | |
if (testWidth > maxWidth && n > 0) { |
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 | |
/** | |
* Get Google Page Speed Screenshot | |
* | |
* Uses Google's Page Speed API to generate a screenshot of a website. | |
* Returns the image as a base64 jpeg image tag | |
* | |
* Usage Example: | |
* echo getGooglePageSpeedScreenshot("http://ghost.org", 'class="thumbnail"'); | |
* |
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
var Stack = function(){ | |
this.storage = {}; | |
this.count = 0; | |
}; | |
Stack.prototype.push = function(val) { | |
this.storage[this.count++] = val; | |
return this.count; | |
} |
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
# Before Script | |
before_script: | |
- composer self-update | |
- composer install --prefer-dist > /dev/null | |
- cp .env.example .env | |
- php artisan key:generate | |
- php artisan migrate:refresh | |
# Services | |
services: |
OlderNewer