Skip to content

Instantly share code, notes, and snippets.

@iqbmo04
iqbmo04 / vscode-extension-offline.md
Created October 17, 2025 13:44 — forked from wanglf/vscode-extension-offline.md
Download VS Code extensions as VSIX

How to use?

  • Copy content of vsix-bookmarklet, create a bookmark in your browser.
  • Navigate to the web page of the VS Code extension you want to install.
  • Click the bookmark you just created, then click the download button.
    download
  • After download finished, rename the file extension to *.vsix.
  • In VS Code, select Install from VSIX... in the extension context menu.
    vsc
@iqbmo04
iqbmo04 / Set_Keyboard_Layout.ps1
Created October 17, 2024 10:27 — forked from liilac/Set_Keyboard_Layout.ps1
Powershell script to set keyboard layout, using most preferred language active on a system
# Sets the default input method for the user to Dvorak with the most-preferred
# locale currently active
# Author: Lilac Kapul <lilac@enby.ninja>
# Copyright (c) 2020 Lilac Kapul
# License: MIT
#####################
# BEGIN PREFERENCES #
#####################
@iqbmo04
iqbmo04 / KeyboardLayouts.cs
Created October 17, 2024 10:16 — forked from vurdalakov/KeyboardLayouts.cs
Working with keyboard layouts on Windows in C# (ActivateKeyboardLayout/GetKeyboardLayout/GetKeyboardLayoutList)
namespace Vurdalakov
{
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Runtime.InteropServices;
public class KeyboardLayout
@iqbmo04
iqbmo04 / README.md
Created September 5, 2024 07:14 — forked from simenbrekken-visma/README.md
Hide fetch/XHR in Cypress command log

This novel workaround simply hides any command log entries that originate from fetch/XHR requests.

While I've updated this receipe for Cypress 10 and converted it to TypeScript you should be able to use it in a JavaScript project by ignoring the cypress.d.ts file and placing the snippet from e2e.ts in e2e.js instead.

@iqbmo04
iqbmo04 / README.md
Created September 5, 2024 07:13 — forked from simenbrekken/README.md
Hide fetch/XHR in Cypress command log

This novel workaround simply hides any command log entries that originate from fetch/XHR requests.

While I've updated this receipe for Cypress 10 and converted it to TypeScript you should be able to use it in a JavaScript project by ignoring the cypress.d.ts file and placing the snippet from e2e.ts in e2e.js instead.

@iqbmo04
iqbmo04 / xpath-sample.js
Created April 5, 2024 08:25 — forked from DinoChiesa/xpath-sample.js
use of @xmldom/xmldom in JavaScript to read and update nodes in an XML document
const data = `<Foo>
<Bar baz='17'>textvalue</Bar>
<Baz>hello,world</Baz>
</Foo>`;
const xmldom = require('@xmldom/xmldom'),
DOMParser = xmldom.DOMParser,
xpath = require('xpath'),
doc = new DOMParser().parseFromString(data),
attr = xpath.select('/Foo/Bar/@baz', doc)[0],
@iqbmo04
iqbmo04 / writeToDisk.js
Created January 17, 2024 14:08 — forked from vdespa/writeToDisk.js
Newman - Logging request and response body
const newman = require('newman');
newman.run({
collection: require('./postman_collection.json'),
reporters: 'cli'
}).on('beforeRequest', function (error, args) {
if (error) {
console.error(error);
} else {
// Log the request body
@iqbmo04
iqbmo04 / multiple_ssh_setting.md
Created November 7, 2023 08:07 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

@iqbmo04
iqbmo04 / script.js
Created October 13, 2023 07:40 — forked from tetebueno/script.js
K6 website test
import http from 'k6/http';
import { check, sleep } from 'k6';
export const URL = 'https://test.k6.io';
export default function () {
let res = http.get(URL);
check(res, {
'resource returns status 200': (r) => r.status === 200,
});