Skip to content

Instantly share code, notes, and snippets.

View scarf005's full-sized avatar

scarf scarf005

View GitHub Profile
@scarf005
scarf005 / font_ligatures.user.js
Last active December 23, 2021 10:10
userscript for #tempermonkey; changes font for code block. original by peko
// ==UserScript==
// @name Font Ligatures
// @namespace https://gist.github.com/scarf005/
// @version 0.5.0
// @description ligatures are good
// @author youkim
// @match *://*/*
// @grant none
// ==/UserScript==
@scarf005
scarf005 / sanitize_stackoverflow.user.js
Last active February 14, 2024 11:14
remove stackoverflow sidebars and other junks
// ==UserScript==
// @name Sanitize Stackoverflow
// @namespace https://gist.github.com/scarf005/
// @version 0.2.1
// @description excesive information is crime
// @author scarf005
// @match https://stackoverflow.com/*
// @match https://*.stackexchange.com/*
// @match https://askubuntu.com/*
// @match https://superuser.com/*
@scarf005
scarf005 / arrow_lambda_py.settings.json
Created December 23, 2021 10:10
prettify python lambda into javascript style arrow function. does not changes actual symbol.
{
"symbolMasks.masks": [
{
"language": "python",
"patterns": [
{
"pattern": "(lambda)|(?<=lambda).?\\s?|(?<=lambda[^:]*):",
"replace": {
"lambda": { "text": "λ" },
": ": { "text": "() => " },
@scarf005
scarf005 / symlink_caches.py
Created January 6, 2022 02:41
because 5GB is never enough
@scarf005
scarf005 / crawl_isbn.py
Created January 19, 2022 06:54
some ugly little snippet to find toc from isbn13
#!/usr/bin/env python3
from aiohttp import ClientSession as Session
from asyncio import run
from bs4 import BeautifulSoup as Soup
from pprint import pprint
from sys import argv
yes24 = "http://www.yes24.com"
@scarf005
scarf005 / install_vscode.py
Last active May 21, 2022 03:31
install visual studio @ cursus
#!/usr/bin/env python3
from io import BytesIO
from os import chdir, environ, getcwd, system
from pathlib import Path
from subprocess import run
import requests
HOME = environ["HOME"]
from os import environ
from pathlib import Path
from typing import Tuple
template = """\
{line}
{s:39} {e}
{s:39} ::: :::::::: {e}
{s:4} {filename:50.50} :+: :+: :+: {e}
{s:39} +:+ +:+ +:+ {e}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// ==UserScript==
// @name Sanitize DCinside
// @namespace https://gist.github.com/scarf005/72089ee97f9c2984273a90da05c42bd7
// @version 0.3.0
// @description make this site less of a pain to read
// @author scarf005
// @match https://gall.dcinside.com/*
// @grant none
// ==/UserScript==
{