Skip to content

Instantly share code, notes, and snippets.

sogaiu

Block or report user

Report or block sogaiu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sogaiu
sogaiu / setup-vim-iced-with-socket-repl.md
Last active Jan 15, 2020
vim-iced with socket repl
View setup-vim-iced-with-socket-repl.md
  1. Using Ubuntu derivative

  2. Install neovim from source (see neovim wiki)

  3. Install vim-plug

    curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
     https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
    
@sogaiu
sogaiu / node-module-mismatch-for-node-code-in-vscode-extension.md
Last active Jan 15, 2020
dealing with NODE_MODULE_VERSION mismatch for vscode extension
View node-module-mismatch-for-node-code-in-vscode-extension.md

Tried to use the node-ctags module in a VSCode (1.41.1) extension and got:

Activating extension 'undefined_publisher.aclomplete' failed: The module '/home/user/src/aclomplete/node_modules/ctags/build/Release/ctags.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 73. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`)..

Addressed by:

@sogaiu
sogaiu / gist:2e690bf2020e669601609b3c7e8e7f08
Created Jan 11, 2020
use virtualenv with gigasquid's "hugging fact gpt with clojure" tutorial
View gist:2e690bf2020e669601609b3c7e8e7f08
# some tweaks to instructions at:
# http://gigasquidsoftware.com/blog/2020/01/10/hugging-face-gpt-with-clojure/
mkdir hugging-face-gpt-clojure
cd hugging-face-gpt-clojure
# keep system clean by using virtualenv
sudo apt install virtualenv
virtualenv -p python3 hfgc
source hfgc/bin/activate
@sogaiu
sogaiu / cm.clj
Created Dec 31, 2019
clojure.main/repl using system classloader
View cm.clj
;; modified clojure.main
;; Copyright (c) Rich Hickey All rights reserved. The use and
;; distribution terms for this software are covered by the Eclipse Public
;; License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can be found
;; in the file epl-v10.html at the root of this distribution. By using this
;; software in any fashion, you are agreeing to be bound by the terms of
;; this license. You must not remove this notice, or any other, from this
;; software.
@sogaiu
sogaiu / elecom-deft-pro-mouse-button-swap.sh
Created Dec 25, 2019
swap the fn2 button with the right mouse button for a elecom deft pro mouse
View elecom-deft-pro-mouse-button-swap.sh
#! /bin/sh
# from: https://help.ubuntu.com/community/MouseCustomizations#Scroll_Wheel_And_Getting_Buttons_To_Respond
# use the following to see the existing arrangement
#xmodmap -pp
# swap the Fn2 button with the right mouse button
xmodmap -e "pointer = 1 2 11 4 5 6 7 8 9 10 3 12"
@sogaiu
sogaiu / configure-lcd-and-external-max-2.sh
Created Dec 25, 2019
configure lcd and external for onyx boox max 2
View configure-lcd-and-external-max-2.sh
#! /bin/sh
# adapted: https://bugzilla.xfce.org/show_bug.cgi?id=11712#c2
xrandr --output eDP1 --auto --primary
xrandr --output HDMI1 --auto
xrandr --output HDMI1 --auto --same-as eDP1
# adapted: https://bbs.archlinux.org/viewtopic.php?pid=934556#p934556
xrandr --output HDMI1 --panning 2104x1560
@sogaiu
sogaiu / java-annotations-via-interop.clj
Created Dec 25, 2019
how to do java annotations in clojure via interop
View java-annotations-via-interop.clj
;; thanks to lvh -- https://github.com/lvh/CCryptoClojure
(definterface LibC
(^int gettimeofday
[^Timeval ^{Out {} Transient {}} tv
^Pointer unused]))
View hello.rs
fn main() {
println!("Hello World!");
}
View hello.c
#include <stdlib.h>
int main() {
system("xterm");
return 0;
}
You can’t perform that action at this time.