Skip to content

Instantly share code, notes, and snippets.

@include-yy
include-yy / init.el
Last active May 6, 2024 07:00
include-yy's emacs config file
;;; init.el --- include-yy's emacs config -*- lexical-binding:t;no-byte-compile:t; -*-
;; Copyright (C) 2023 include-yy <yy@egh0bww1.com>
;; Author: include-yy <yy@egh0bww1.com>
;; Created: 17 Jun 2023
;; Version: 0.1
;; Keywords: config
;; URL: https://gist.github.com/include-yy/e70dcbfc1a80403814d0b7a7357971d9
@Gavinok
Gavinok / chatgpt.el
Last active June 4, 2023 22:22
chatgpt client for emacs WIP (Now Async!)
;;; chatgpt.el --- Simple ChatGPT frontend for Emacs -*- lexical-binding: t -*-
;; Copyright (C) Gavin Jaeger-Freeborn
;; This package is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; This package is distributed in the hope that it will be useful,
@doolio
doolio / .dir-locals.el
Last active January 25, 2024 11:06
.dir-locals.el for use with the Emacs Eglot LSP client and python-lsp-server (pylsp) LSP server
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
;;; Commentary:
;; .dir-locals.el for use with the Emacs Eglot LSP client and
;; python-lsp-server (pylsp) LSP server v1.10.0.
;; Default values in accordance with
;; https://github.com/python-lsp/python-lsp-server/blob/v1.10.0/CONFIGURATION.md
@karthink
karthink / repeat-mode-config.el
Created July 3, 2022 10:59
repeat-mode configuration with which-key for Emacs 28
(use-package repeat
:if (version< "28.0" emacs-version)
:bind ("H-z" . repeat)
:hook (after-init . my/repeat-mode)
:config
(defun my/repeat-mode ()
(let ((inhibit-message t)
(message-log-max nil))
(repeat-mode)))
@llinfeng
llinfeng / eink_clean.ahk
Last active December 14, 2023 04:09
Force full-screen refresh on e-ink monitors
#SingleInstance, force ; Allow only one instance of this script to be running.
#Persistent ; To stop the script from exiting.
; Here, press F1 to trigger the black/white flash
F1::
; Source: https://superuser.com/questions/662264/i-would-like-to-make-the-screen-go-black-every-8-seconds-how
Gui, Color, 000000
Gui, Show, x-5000 y-20 w8000 h8000
sleep 333
Gui, Color, FFFFFF
@twlz0ne
twlz0ne / emacs-pager
Last active May 22, 2022 09:08
Emacs as Pager
#!/usr/bin/env bash
set -e
# Emacs as pager
#
# Author: gongqijian@gmail.com
# Created: 2021-06-06 16.08.51
# Version: 0.1
#
# Installation:
// ==UserScript==
// @name 湖南农信加速学习
// @version 1
// @description 二、三分屏,在线制作 三类课程加速学习
// @match http://hnnxyxt.21tb.com/els/html/courseStudyItem/courseStudyItem.learn.do*
// @require https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js
// @grant none
// ==/UserScript==
var uri;// = decodeURIComponent($("#aliPlayerFrame")[0].src);
@QiangF
QiangF / i3run
Created November 11, 2020 03:56 — forked from budRich/i3run
run, raise or minimize applications
#!/bin/bash
# i3run
# run, raise or minimize a program depending on its state.
#
# https://www.reddit.com/r/i3wm/comments/6x0p0q/oc_i3run/
# https://gist.github.com/budRich/8810a88a5a24080f4c499c65da76853b
#
# if target window doesn't exist, a given command is launched.
# if target window is on another workspace, it is moved to current
@amno1
amno1 / open-with.el
Last active May 24, 2020 07:59
open-with.el hacked for my own taste ...
;;; openwith.el --- Open files with external programs -*- lexical-binding: t; -*-
;; <2020-04-10 fre> A. Miller
;; Hacked openwith to not be a minor mode.
;; The handler is now changed to be interactive function so it can be bound
;; to a key and invoked manually when desired instead of being a global handler.
;; Assumes invocation from a dired buffer, so the name is changed
;; to reflect the prefered use case.
;; Copyright (C) 2007 Markus Triska
@Parassharmaa
Parassharmaa / booky.py
Created May 1, 2020 05:07
Python Script to Fetch Books from Libgen
import requests
from bs4 import BeautifulSoup
base_url = "http://gen.lib.rus.ec"
headers = {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Accept-Encoding': 'gzip, deflate, sdch',
'Accept-Language': 'en-US,en;q=0.8',