Skip to content

Instantly share code, notes, and snippets.

View haqadn's full-sized avatar

Adnan Haque haqadn

View GitHub Profile
import { chromium } from "playwright";
type Measurements = { screenWidth: number, VW: number, PX: number };
async function getMeasurements( initialWidth: number, granularity: number, url: string, selector: string ) {
const browser = await chromium.launch({
// Width and height of the browser window
width: initialWidth,
height: 1024,
headless: false,
@haqadn
haqadn / cookie-monster.php
Last active March 30, 2022 05:29
Block WP login based on cookie
@haqadn
haqadn / index.html
Created March 7, 2022 05:47
Page with CSS Keyframe
<!DOCTYPE html>
<html>
<head>
<title>Test Page</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>
@haqadn
haqadn / copy-hyperlinked-github-issue-title.js
Created January 14, 2022 04:12
Tempermonkey Script: Copy hyperlinked github issue title
// ==UserScript==
// @name Copy Hyperlinked Github Issue Title
// @namespace https://github.com/
// @version 0.1
// @description Copy the github issue/pr name. The name would be linked as rich text.
// @author Adnan Haque <adnan007.id@gmail.com>
// @match https://github.com/*
// @grant none
// ==/UserScript==
#include <cstdio>
#include <iostream>
#define ll unsigned long long int
using namespace std;
int main(){
ll fib[100];
<?php
$progs = get_posts( [
'post_type' => 'program',
'post_status' => 'publish',
'posts_per_page' => -1 ] );
echo "<ul>";
foreach( $progs as $prog ){
echo "<li>";
echo $prog->post_title . ' : ';