Skip to content

Instantly share code, notes, and snippets.

const pw = require('playwright');
const UserAgent = require('user-agents');
const uuid = require('uuid');
const tmp = require('tmp-promise');
const UINT32_MAX = (2 ** 32) - 1;
const WEBGL_RENDERERS = ['ANGLE (NVIDIA Quadro 2000M Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (NVIDIA Quadro K420 Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (NVIDIA Quadro 2000M Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (NVIDIA Quadro K2000M Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (ATI Radeon HD 3800 Series Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (AMD Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D
@pnd280
pnd280 / README.md
Created May 26, 2024 14:11 — forked from george-hawkins/README.md
Forcing GitHub to reindex your repos

Forcing GitHub to reindex your repos

Apparently, GitHub stops indexing repos that have not had a commit for over a year. They say this is to ensure that search limits itself to providing the most relevant results.

But this is a pain if you know your own repos contain some particular information but GitHub turns up no search results because of this constraint.

A way to force a reindex of a repo is to search it - you may get no results but GitHub will put the repo in a queue to be reindexed and in about 5 minutes the same search may produce a result if the repo contains the relevant term.

However, if you don't know the relevant repo and want to search all your repos, it's somewhat inconvenient to have to manually search them all to force a reindex.

@pnd280
pnd280 / workspace-utils.sh
Created November 17, 2023 09:08
gnome 45 static workspace utils
#!/usr/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: $0 [increase|decrease|delete-empty-ws]"
exit 1
fi
current_workspaces=$(wmctrl -d | wc -l)
if [ "$1" == "increase" ]; then
// source: https://www.spoj.com/PTIT/problems/PTIT018K/
#include <iostream>
using namespace std;
int searchForDuplicate(int* arr, int size, int* resultArr, int x, int ignore)
{
int foundCases = 0;
for (int i = 1; i <= size; i++)
{
{sometexthere
anothertexthere
}
{sometexthere1
anothertexthere1
}
{sometexthere2
anothertexthere2
}