This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From d6729f5621abbf374a371dd6fdaa13d7dd209468 Mon Sep 17 00:00:00 2001 | |
From: Merrick Luo <[email protected]> | |
Date: Sun, 14 Jan 2024 19:02:47 +0800 | |
Subject: [PATCH] Make line spacing centered | |
--- | |
src/xdisp.c | 10 ++++++++-- | |
1 file changed, 8 insertions(+), 2 deletions(-) | |
diff --git a/src/xdisp.c b/src/xdisp.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; copilot.el --- copilot backend for gptel -*- lexical-binding: t; -*- | |
;; | |
;; Copyright (C) 2024 Merrick Luo | |
;; | |
;; Author: Merrick Luo <[email protected]> | |
;; Maintainer: Merrick Luo <[email protected]> | |
;; Created: January 10, 2024 | |
;; Modified: January 10, 2024 | |
;; Version: 0.0.1 | |
;; Keywords: comm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
## Copilot OpenAI Proxy | |
## A http server that proxies openai requests to copilot by adding required headers | |
## Copilot cli must be installed and logged in | |
## Inspired by https://github.com/aaamoon/copilot-gpt4-service | |
## | |
## only external dependency is requests, cuz http.client is shit, so as http.server | |
import json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns day18 | |
(:require [clojure.pprint :refer [pprint]] | |
[clojure.zip :as z])) | |
(defn exp-left [sn n] | |
(loop [t (z/prev sn) l 1] | |
(if (nil? t) | |
sn | |
(let [tn (z/node t)] | |
(if (number? tn) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use-package! tree-sitter | |
:when (bound-and-true-p module-file-suffix) | |
:hook (prog-mode . tree-sitter-mode) | |
:hook (tree-sitter-after-on . tree-sitter-hl-mode) | |
:config | |
(require 'tree-sitter-langs) | |
(global-tree-sitter-mode) | |
(add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode) | |
(defadvice! doom-tree-sitter-fail-gracefully-a (orig-fn &rest args) | |
"Don't break with errors when current major mode lacks tree-sitter support." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
resolution=3840 | |
api="https://bing.biturl.top/?resolution=$resolution" | |
store="$HOME/Pictures/Bing" | |
mkdir -p $store | |
img_url=`curl -s $api | jq -r .url` | |
img_name=${img_url##*=} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addEventListener("fetch", (event) => { | |
event.respondWith( | |
handleRequest(event).catch( | |
(err) => new Response(err.stack, { status: 500 }) | |
) | |
); | |
}); | |
/** | |
* Many more examples available at: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jenkins/jenkins:lts-alpine | |
ARG DOCKER_CLI_VERSION="19.03.9" | |
ENV DOWNLOAD_URL="https://download.docker.com/linux/static/stable/x86_64/docker-$DOCKER_CLI_VERSION.tgz" | |
USER root | |
# install docker client | |
RUN mkdir -p /tmp/download \ | |
&& curl -L $DOWNLOAD_URL | tar -xz -C /tmp/download \ && mv /tmp/download/docker/docker /usr/local/bin/ \ | |
&& rm -rf /tmp/download \ USER ${user} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.6.15-zen2-1-zen] (local build) | |
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org | |
=== START OF INFORMATION SECTION === | |
Model Family: Seagate Desktop SSHD | |
Device Model: ST1000DX001-1CM162 | |
Serial Number: * | |
LU WWN Device Id: 5 000c50 079d815a2 | |
Firmware Version: CC43 | |
User Capacity: 1,000,204,886,016 bytes [1.00 TB] |
NewerOlder