Skip to content

Instantly share code, notes, and snippets.

View ShivamKumar2002's full-sized avatar
🎯
Focusing

Shivam Kumar ShivamKumar2002

🎯
Focusing
  • India
View GitHub Profile
@diffficult
diffficult / installing_virt_manager.md
Last active June 1, 2024 13:53
Easy instructions to get virt-manager qemuv/kvm running on Arch

Easy instructions to get QEMU/KVM and virt-manager up and running on Arch

  1. Make sure your cpu support kvm with below command:

     grep -E "(vmx|svm)" --color=always /proc/cpuinfo
    
  2. Make sure BIOS have enable “Virtualization Technology”.

  3. User access to /dev/kvm so add your account into kvm(78) group:

@AndersonIncorp
AndersonIncorp / build-php-zts7.2.1-archlinux.txt
Created March 25, 2018 19:04
build-php-zts7.2.1-archlinux.txt php-zts7.2.1 or php7.2.1 without conflict with main php
# ! /bin/bash
# Build of php-zts OR php (if remove --enable-maintainer-zts flag) as second php into /usr/local/php/php-zts7.2.1
# Based on
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=php-zts
mkdir -p /root/aur-php/
cd /root/aur-php/
curl -O https://aur.archlinux.org/cgit/aur.git/snapshot/php-zts.tar.gz
tar -xzf php-zts.tar.gz -C patch
curl -O -L https://php.net/distributions/php-7.2.1.tar.xz
@thefranke
thefranke / RSS.md
Last active July 23, 2024 21:31
A list of RSS endpoints, readers and resources

The RSS Endpoint List

Please refer to this blogpost to get an overview.

Replace *-INSTANCE with one of the public instances listed in the scrapers section. Replace CAPITALIZED words with their corresponding identifiers on the website.

Social Media

Twitter

@stecman
stecman / dump-pyc-with-gdb.md
Last active July 1, 2024 16:56
Dumping all bytecode from a packaged Python application

This is a technique for extracting all imported modules from a packaged Python application as .pyc files, then decompiling them. The target program needs to be run from scratch, but no debugging symbols are necessary (assuming an unmodified build of Python is being used).

This was originally performed on 64-bit Linux with a Python 3.6 target. The Python scripts have since been updated to handle pyc files for Python 2.7 - 3.9.

Theory

In Python we can leverage the fact that any module import involving a .py* file will eventually arrive as ready-to-execute Python code object at this function:

PyObject* PyEval_EvalCode(PyObject *co, PyObject *globals, PyObject *locals);
@felipou
felipou / decrypt_dbeaver.py
Last active July 2, 2024 14:56
DBeaver password decryption script - for newer versions of DBeaver
# https://stackoverflow.com/questions/39928401/recover-db-password-stored-in-my-dbeaver-connection
# requires pycryptodome lib (pip install pycryptodome)
import sys
import base64
import os
import json
from Crypto.Cipher import AES
@kcubeterm
kcubeterm / Google-sdk-termux.md
Last active June 30, 2024 04:10
How to install google cloud sdk in termux and run cloud shell interactively.

Now Google cloud sdk support python3.9 as well. Lets start.

Without any surprise,use your copy-paste skills to fire following script into your innocent terminal.

pkg install python3 openssh
curl -o sdk.sh sdk.cloud.google.com
chmod +x sdk.sh
./sdk.sh --install-dir=$PREFIX
@FreddieOliveira
FreddieOliveira / docker.md
Last active July 25, 2024 00:50
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@sindresorhus
sindresorhus / esm-package.md
Last active July 25, 2024 04:47
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@kepano
kepano / obsidian-web-clipper.js
Last active July 22, 2024 07:29
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */