Skip to content

Instantly share code, notes, and snippets.

SELECT
r.reviews_id AS id,
r.products_sizes_id AS sizesId,
r.flags AS flags,
r.sort_order AS sortOrder,
if(r.reviews_id IS NOT NULL, TRUE, FALSE) AS isReviewed,
r.reviews_rating AS rating,
r.fit_rating AS fit,
r.height AS height,
@nheath
nheath / gist:f86e38a804913df82af86baa1838bb71
Created December 15, 2017 19:23 — forked from tobek/get-image-urls.js
Save images from chrome inspector network tab
/* right click on an entry in the network log, select Copy All as Har
* type in console: x = [paste]
* paste the following JS code into the console
* copy the output, paste into a file
* then wget -i [that file]
*/
(function(logObj, mime) {
var results = [];
logObj.log.entries.forEach(function (entry) {
if (mime && entry.response.content.mimeType !== mime) return;
[agent]
interval = "10s"
round_interval = true
metric_buffer_limit = 5000
flush_buffer_when_full = true
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
debug = true
quiet = false
@nheath
nheath / gist:ee6aaa509b44e7909c96
Created July 7, 2015 16:34
fabric mixed execution
@task(default=True)
def deploy(source):
execute('unique_id')
dest = '/opt/app/{0}'.format(env['unique_id'])
# both of these tasks are decorated with @parallel
execute('sync', source=source, dest='~/app')
execute('install', source="~/app", dest=dest)
# apply following steps serially to each env.host
'use strict';
module.exports = function (grunt) {
grunt.initConfig({
package: grunt.file.readJSON('package.json'),
name: '<%= package.name %>',
version: '<%= package.version %>',
build: '<% return process.env.BUILD_NUMBER %>',
artifact: '<%= name %>-<%= version %>',
artifactBuild: '<%= name %>-<%= version %>-<%= build %>',