Skip to content

Instantly share code, notes, and snippets.

View Eason0210's full-sized avatar
🎯
Focusing

Eason Huang Eason0210

🎯
Focusing
View GitHub Profile
@Eason0210
Eason0210 / emacs-29.0.92-2bad582-build-log.txt
Created June 21, 2023 05:14
emacs-29.0.92-2bad582-build-log
MINGW64 ~/src/emacs-29
$ ./autogen.sh
Checking whether you have the necessary tools...
(Read INSTALL.REPO for more details on building Emacs)
Checking for autoconf (need at least version 2.65) ... ok
Your system has the required tools.
Building aclocal.m4 ...
Running 'autoreconf -fi -I m4' ...
ac-wrapper: autoreconf: warning: auto-detected versions not found ( ); falling back to latest available
You can now run './configure'.
@Eason0210
Eason0210 / emacs-29.0.92-native-compilation-log.txt
Created June 19, 2023 13:12
Build Emacs 29.0.92--with-native-complilation=aot
MINGW64 ~/src
$ tar xJf emacs-29.0.92.tar.xz
MINGW64 ~/src
$ cd emacs-29.0.92/
MINGW64 ~/src/emacs-29.0.92
$ ls
aclocal.m4 ChangeLog config.bat doc INSTALL.REPO lwlib modules README
admin ChangeLog.1 configure etc leim m4 msdos site-lisp
[internal] Sat Jun 17 21:04:15 2023:
(:message "Running language server: /Users/aqua0210/.nvm/versions/node/v19.6.0/bin/pyright-langserver --stdio")
[client-request] (id:1) Sat Jun 17 21:04:15 2023:
(:jsonrpc "2.0" :id 1 :method "initialize" :params
(:processId 79724 :rootPath "/Users/aqua0210/Code/Python/django-project/" :rootUri "file:///Users/aqua0210/Code/Python/django-project" :initializationOptions #s(hash-table size 1 test eql rehash-size 1.5 rehash-threshold 0.8125 data
())
:capabilities
(:workspace
(:applyEdit t :executeCommand
(:dynamicRegistration :json-false)
@Eason0210
Eason0210 / run-psql.ps1
Created June 13, 2023 05:18 — forked from MasFlam/run-psql.ps1
PowerShell script to run psql prompting for connection details
Write-Host "Enter connection details:"
$server = "localhost"
$server_maybe = (Read-Host -Prompt "Server [$server]")
If($server_maybe -ne "") {
$server = $server_maybe
}
$db = "postgres"
@Eason0210
Eason0210 / how-to.txt
Created November 11, 2022 15:23 — forked from simonw/how-to.md
How to create a tarball of a git repository using "git archive"
git archive --format=tar.gz -o /tmp/my-repo.tar.gz --prefix=my-repo/ master
@Eason0210
Eason0210 / nix-on-macos-catalina.md
Created September 22, 2021 15:19 — forked from chriselsner/nix-on-macos-catalina.md
Nix on macOS Catalina

Nix on macOS Catalina

I'm writing this gist for my own records but it might help someone else too.

Installing Nix

Support for Catalina has improved a lot since the update was first rolled out.

Note: See the NixOS manual for discussion of the --darwin-use-unencrypted-nix-store-volume option.

# Instructions for fresh install
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon
# reboot
$ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc
$ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
<html>
<head>
<HTA:APPLICATION Icon="C:\test.ico"/>
<TITLE>Distance</TITLE>
</head>
<script language="VBScript">
Sub Window_Onload
On Error Resume Next
Set x = document.getElementById("div1")
Height = x.offsetHeight + 80
@Eason0210
Eason0210 / MyEmacsKeymap.ahk
Created June 30, 2020 13:57 — forked from tado/MyEmacsKeymap.ahk
My Emacs-like Keybindings for AutoHotKey
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; MyEmacsKeymap.ahk
;; - An AutoHotkey script to simulate Emacs keybindings on Windows
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Settings for testing
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; enable warning
;#Warn All, MsgBox
@Eason0210
Eason0210 / auto-python-venv.md
Created February 19, 2020 12:58 — forked from purcell/auto-python-venv.md
Sane automatic python + virtualenv

Automatic python version plus venv

Goal

For easy editor integration and command-line usage, we'd like to be able to specify a Python version per project, with its own virtualenv to isolate its libraries from those of other projects.

We're willing to change $PATH globally once, but not per project. And we'd like to avoid having to run every python command invocation in a special subshell created by a shell wrapper. Instead, simply invoking "python" or "pip" etc. should do the right thing, based on the directory in which it is invoked.

It turns out this is possible!