All these v*.** got fixed by go get -d github.com//@master
/* | |
* Hover over an element on the page | |
*/ | |
(function() { | |
"use strict"; | |
var webdriver = require('selenium-webdriver'); | |
var driver = new webdriver.Builder().usingServer().withCapabilities({'browserName': 'chrome' }).build(); |
function memorySizeOf(obj) { | |
var bytes = 0; | |
function sizeOf(obj) { | |
if(obj !== null && obj !== undefined) { | |
switch(typeof obj) { | |
case 'number': | |
bytes += 8; | |
break; | |
case 'string': |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"time" | |
"github.com/prometheus/tsdb" | |
"github.com/prometheus/tsdb/labels" |
Fast way of getting count of all rows in a very long table: (https://stackoverflow.com/a/7945274)
SELECT reltuples::bigint AS estimate FROM pg_class where relname='mytable';
OR
SELECT reltuples::bigint AS estimate FROM pg_class WHERE oid = 'myschema.mytable'::regclass;
(if there's a schema)
and fast way of getting count of rows across all partitions (https://stackoverflow.com/a/30594273):
To show CPU frequency in linux,
cat /proc/cpuinfo | grep "cpu MHz"
limiting CPU throttling https://dunterov.github.io/cpu-freq/
set max CPU frequency: sudo cpupower --cpu all frequency-set --max 1500MHz
during go benchmarks, change this to sudo cpupower --cpu all frequency-set --max 300MHz
install timescaledb (includes promscale extension)
docker run --name promscale-extension-image -e POSTGRES_PASSWORD=secret -d -p 5431:5432 timescaledev/promscale-extension:latest-pg12 postgres -csynchronous_commit=off
get the IP address of the container running timescaledb
docker inspect {container-ID}
copy the above output
This gist discusses about integrating gitter community with Github webhooks so that updates in github can be shwon under activity place in gitter comunity room.
To do this, follow the steps:
- Click on settings
- Go to integrations
- Click on Github
- You will get a token there. Copy that and call it, say TOKEN.