Feel free to contact me at [email protected] or tweet at me @statisticsftw
This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!
It assumes some knowledge of AWS.
| -- Temporary file usage by database | |
| SELECT datname AS "database", temp_files AS "Temporary files", temp_bytes | |
| AS "Size of temporary files" | |
| FROM pg_stat_database; | |
| -- Cache Hit Ratio. Anything greater than 90% is always good | |
| SELECT sum(blks_hit)*100/sum(blks_hit+blks_read) AS hit_ratio FROM pg_stat_database; | |
| -- Top Queries | |
| SELECT substr(query, 0, 250), calls, |
Feel free to contact me at [email protected] or tweet at me @statisticsftw
This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!
It assumes some knowledge of AWS.
| # Welcome to Serverless! | |
| # | |
| # Happy Coding! | |
| service: cross-region-sns-subscriber | |
| # Keep environment specific configurations in separate files | |
| custom: ${file(config/${env:STAGE}.json)} | |
| provider: |
| 'use strict'; | |
| console.log('// loading function'); | |
| const aws = require('aws-sdk'); | |
| const s3 = new aws.S3({apiVersion: '2006-03-01'}); | |
| const gzip = require('zlib').createGunzip(); | |
| const fs = require('fs'); |
Makefile and YAML templates for automating the use of AWS Elastic Container Registry with Kubernetes.
Based off of this awesome Redsaid blog post.
| <?php | |
| // Just run via command line php -q sample_timesheet_fetch.php | |
| date_default_timezone_set("Australia/Sydney"); | |
| $actual_db = array(); | |
| $total_count = 0; | |
| // get all timesheets | |
| //$search = array('emp_search' => array('field' => 'Employee' , 'data'=> "1" , 'type' => 'ge' ) ); | |
| // get just everything since last 1 week | |
| $search = array('created_search' => array('field' => 'Created' , 'data'=> date("Y-m-d 00:00:00" , strtotime("-1 week")) , 'type' => 'ge' ) ); |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
In response to this Stack Overflow question I thought it would be helpful to demonstrate one way to add vertical lines and labels to a nvd3 time series lineWithFocusChart. Hopefully it will help both the R rCharts and the straight Javascript nvd3 user. I solved a small syncing problem with the brushing by adding a window.setTimeout on brushend. It seems to work fairly well.
Please let me know if there might be a better way to handle.
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');Those suck for maintenance and they're ugly.
| (function() { | |
| /** | |
| * Emulates the PHP strtotime() function in Javascript. | |
| * | |
| * @link http://www.php.net/strtotime | |
| */ | |
| Spring.datetime.strtotime = function (str, now) { | |
| var i, match, s, strTmp = '', | |
| parse = ''; | |
| strTmp = str; |