-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternatives #14
Comments
SELECT pg_size_pretty(pg_total_relation_size('profile_hourly_views_stats')) AS total_size,
pg_size_pretty(pg_relation_size('profile_hourly_views_stats')) AS data_size,
pg_size_pretty(pg_total_relation_size('profile_hourly_views_stats') - pg_relation_size('profile_hourly_views_stats')) AS index_size;
|
SELECT
DATE_TRUNC('month', time),
COUNT(*),
COUNT(DISTINCT(user_id)),
SUM("count")
FROM profile_hourly_views_stats
GROUP BY 1
ORDER BY 1;
|
This comment was marked as duplicate.
This comment was marked as duplicate.
{
function prepare() {
document.querySelectorAll(".search-results-container ul li").forEach(function ($element) {
if ($element.querySelector(".artdeco-button__text").innerHTML.indexOf("Connect") === -1) {
$element.remove();
return;
}
const $title = $element.querySelectorAll("a[data-test-app-aware-link='']")[1];
if ($title.parentNode.querySelector("a.u8views-github-link") !== null) {
return;
}
const $name = $title.querySelector("span[dir='ltr'] span[aria-hidden='true']");
if ($name === null) {
return;
}
const $link = document.createElement("a");
{
const baseUrl = 'https://github.com/search';
const query = `"${$name.innerText}" OR "${$name.innerText.replace(/\s+/g, '')}" OR "${$name.innerText.replace(/\s+/g, '-')}"`;
$link.href = `${baseUrl}?q=${encodeURIComponent(query)}&type=users`;
$link.className = "u8views-github-link";
const $linkName = document.createElement("span");
$linkName.innerText = "Search on GitHub";
$link.append($linkName);
}
$title.parentNode.append($link);
});
}
document.body.addEventListener("keyup", function (e) {
// if key is "Ctrl + E" then execute the code
if (e.ctrlKey && e.key === "e") {
prepare();
}
});
} |
{
function prepare() {
document.querySelectorAll(".mn-connection-card.artdeco-list").forEach(function ($element) {
const $name = $element.querySelectorAll(".mn-connection-card__name")[0];
if ($name.parentNode.querySelector("a.u8views-github-link") !== null) {
return;
}
const $link = document.createElement("a");
{
const baseUrl = 'https://github.com/search';
const query = `"${$name.innerText}" OR "${$name.innerText.replace(/\s+/g, '')}" OR "${$name.innerText.replace(/\s+/g, '-')}"`;
$link.href = `${baseUrl}?q=${encodeURIComponent(query)}&type=users`;
$link.className = "u8views-github-link";
const $linkName = document.createElement("span");
$linkName.innerText = "Search on GitHub";
$link.append($linkName);
}
$name.parentNode.append($link);
});
}
document.body.addEventListener("keyup", function (e) {
// if key is "Ctrl + E" then execute the code
if (e.ctrlKey && e.key === "e") {
prepare();
}
});
} |
{
function getElementByInnerText(selector, text) {
const $elements = document.querySelectorAll(selector);
for (const $element of $elements) {
if ($element.textContent.trim() === text) {
return $element;
}
}
return null;
}
document.body.addEventListener("keyup", function(e) {
// if key is "Ctrl + E" then execute the code
if (e.ctrlKey && e.key === "e") {
let $element = getElementByInnerText('.artdeco-button__text', 'Unfollow');
if ($element === null) {
$element = getElementByInnerText('.artdeco-button__text', 'Following');
}
if ($element === null) {
return;
}
$element.click();
}
});
} {
function getElementByInnerText(selector, text) {
const $elements = [...document.querySelectorAll(selector)].filter(function ($element) {
return $element.textContent.trim() === text;
});
if ($elements.length > 0) {
return $elements[Math.floor(Math.random() * $elements.length)];
}
return null;
}
document.body.addEventListener("keyup", function(e) {
// if key is "Ctrl + E" then execute the code
if (e.ctrlKey && e.key === "e") {
let $element = getElementByInnerText('.artdeco-button__text', 'Unfollow');
if ($element === null) {
$element = getElementByInnerText('.artdeco-button__text', 'Following');
}
if ($element === null) {
return;
}
$element.click();
}
});
} {
const followingSequence = {
index: 0,
$elements: []
};
function getElementByInnerText(selector, text, sequence) {
if (sequence !== null) {
if (sequence.$elements.length === 0 || sequence.index >= sequence.$elements.length) {
sequence.index = 0;
sequence.$elements = [...document.querySelectorAll(selector)].filter(function ($element) {
return $element.textContent.trim() === text;
});
}
if (sequence.index < sequence.$elements.length) {
const $element = sequence.$elements[sequence.index];
sequence.index++;
return $element;
}
return null;
}
const $elements = document.querySelectorAll(selector);
for (const $element of $elements) {
if ($element.textContent.trim() === text) {
return $element;
}
}
return null;
}
document.body.addEventListener("keyup", function (e) {
// if key is "Ctrl + E" then execute the code
if (e.ctrlKey && e.key === "e") {
let $element = getElementByInnerText('.artdeco-button__text', 'Unfollow', null);
if ($element === null) {
$element = getElementByInnerText('.artdeco-button__text', 'Following', followingSequence);
}
if ($element === null) {
return;
}
$element.click();
}
});
} {
const followingSequence = {
index: 0,
$elements: []
};
function getElementByInnerText(selector, text, sequence) {
if (sequence !== null) {
if (sequence.$elements.length === 0 || sequence.index >= sequence.$elements.length) {
sequence.index = 0;
sequence.$elements = [...document.querySelectorAll(selector)].filter(function ($element) {
return $element.textContent.trim() === text;
});
}
if (sequence.index < sequence.$elements.length) {
const $element = sequence.$elements[sequence.index];
sequence.index++;
return $element;
}
return null;
}
const $elements = document.querySelectorAll(selector);
for (const $element of $elements) {
if ($element.textContent.trim() === text) {
return $element;
}
}
return null;
}
document.body.addEventListener("keyup", function (e) {
// if key is "Ctrl + E" then execute the code
if (e.ctrlKey && e.key === "e") {
let $element = getElementByInnerText('.artdeco-button__text', 'Unfollow', null);
if ($element === null) {
$element = getElementByInnerText('.artdeco-button__text', 'Following', followingSequence);
}
if ($element === null) {
return;
}
$element.click();
}
});
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tags
Repositories
Projects
The text was updated successfully, but these errors were encountered: