Skip to content

Instantly share code, notes, and snippets.

@KorigamiK
KorigamiK / test.json
Last active July 17, 2022 07:38
test.json
[
{
"_id": "62d30558bcfa950f0a373eb4",
"title": "rice",
"cost": 21.5
},
{
"_id": "62d30602bcfa950f0a373eb5",
"title": "daal",
"cost": 17.7
@KorigamiK
KorigamiK / Install_Huion_Drivers_On_Manjaro.md
Created July 10, 2022 09:53 — forked from shaansubbaiah/Install_Huion_Drivers_On_Manjaro.md
Install Huion 1060plus drivers on Manjaro

Install Huion 1060plus drivers on Manjaro

install (from the AUR) digimend-kernel-drivers-dkms-git and the linux-headers for the kernel you're running.

sudo modprobe -r hid-kye hid-uclogic hid-polostar hid-viewsonic

reboot.

@KorigamiK
KorigamiK / invert-scrolling.sh
Created May 17, 2022 16:17
set natural scrolling for mouse linux
#!/usr/bin/bash
# -*- coding: utf-8 -*-
device_name="PixArt Dell MS116 USB Optical Mouse"
device_id=$(xinput list --id-only "$device_name")
xinput set-prop $device_id "libinput Natural Scrolling Enabled" 0
@KorigamiK
KorigamiK / dup.c
Last active April 23, 2022 07:55
file required for pspLibXml2
#include <fcntl.h>
int dup (int fd1) {
return (fcntl (fd1, F_DUPFD, 0));
}
@KorigamiK
KorigamiK / Makefile.am
Last active April 23, 2022 07:53
psplibxml2-makefile.am
## Process this file with automake to produce Makefile.in
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = include . doc example fuzz xstc $(PYTHON_SUBDIR)
DIST_SUBDIRS = include . doc example fuzz python xstc
AM_CPPFLAGS = -I$(top_builddir)/include -I$(srcdir)/include
@KorigamiK
KorigamiK / math game.js
Last active April 19, 2022 10:05
telegram game
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
(async () => {
const restart = document.querySelector("#button_correct");
restart.click();
while (1) {
await sleep(500);
@KorigamiK
KorigamiK / quiz_compiler.py
Last active February 5, 2025 15:20
A user script for tamper/violent monkey to get all the course content of any course on nptel.ac.in
# %%
import json
# %%
PREAMBLE = '''---
title: Organizational Behaviour
papersize: a4
numbersections: false
documentclass: scrartcl
toc: false
@KorigamiK
KorigamiK / triangle_quest_2.py
Last active December 30, 2021 21:13
a super hideous problem on hackerrank
import math
def nCr(n, r):
if r == 0:
return 1
return math.factorial(n)/(math.factorial(r)*math.factorial(n-r))
@KorigamiK
KorigamiK / filesize_sort.user.js
Last active May 15, 2022 05:35
Snahp.it User Scripts
// ==UserScript==
// @name snahp.eu Forum Sort Topics by Filesize
// @grant none
// @match *://fora.snahp.eu/*
// ==/UserScript==
function sortAllLists(){
Array.from(document.getElementsByClassName('topics')).forEach(sortByFileSize);
return;
}
@KorigamiK
KorigamiK / Jee advance papers VMC.py
Last active September 14, 2021 19:55
Download jee advance paper solutions from VMC and also makes a crawljob for jdownloader
import re
from aiohttp import ClientSession as c
import asyncio
from bs4 import BeautifulSoup as bs
import json
template = "https://www.vidyamandir.com/jeeadvanced20{}.html"
template_2 = "https://www.vidyamandir.com/jeeadv20{}.html"
unnecessary = re.compile(r"\sfor.+dvanced\s(?=\d)")