Skip to content

Instantly share code, notes, and snippets.

@rain-1
rain-1 / LLM.md
Last active April 24, 2024 08:25
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@tarruda
tarruda / README.md
Last active April 8, 2024 23:13
LXD: Full Debian KDE desktop

Intro

This script will create a local LXD image that has a full KDE desktop environment with Xspice as the display server.

Instructions

./setup-debian-kde-desktop-xspice.sh    
lxc init debian-kde-desktop-xspice kde
lxc config device add kde xspicesocket proxy bind=host listen=unix:/tmp/kde.unix connect=unix:/run/xspice/spice.unix uid=1000 gid=1000

lxc start kde

@brian-mann
brian-mann / child.js
Created August 1, 2017 05:06
Fixed timers in electron
process.on('message', (obj = {}) => {
const { id, ms } = obj
setTimeout(() => {
try {
// process.send could throw if
// parent process has already exited
process.send({
id,
ms,
#!/bin/bash
# Prerequisites: http://wiki.openwrt.org/doc/howto/buildroot.exigence
# Additionally JDK is needed
generate_buildenv() {
# Prepare build enviroment
mkdir openwrt_build
cd openwrt_build
git clone --depth=1 git://git.openwrt.org/15.05/openwrt.git
@rauchg
rauchg / effective-es6.md
Last active July 11, 2023 09:38
Writing ES6 today, effectively.

Effective transpiling of ES6

After publishing my article on ECMAScript 6, some have reached out to ask how I exactly I make it all work.

I refrained from including these details on the original post because they're subject to immiment obsoletion. These tools are changing and evolving quickly, and some of these instructions are likely to become outdated in the coming months or even weeks.

The main tool

When evaluating the available transpilers, I decided to use 6to5, which has recently been renamed to Babel. I chose it based on:

@MichaelXavier
MichaelXavier / Gemfile
Last active December 18, 2015 21:29
Some ruby-based tooling for haskell projects that makes development easier for me. Sandboxing requires cabal >= 0.1.7
source "http://rubygems.org"
gem "guard-shell"
gem "rake"
@mislav
mislav / _readme.md
Last active March 28, 2024 00:47
tmux-vim integration to transparently switch between tmux panes and vim split windows

I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).

In Vim I have key bindings C-h/j/k/l set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W.) I'd like to use the same keystrokes for switching tmux panes.

An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\.

Here's how it should work:

@tacahiroy
tacahiroy / ez_tmux.vim
Created August 2, 2012 22:07
Vim easy tmux integration
" tmux: just send keys against tmux
let s:tmux = {}
let s:tmux.last_cmd = ''
function! s:tmux.is_installed()
call system('which tmux')
return v:shell_error == 0
endfunction
function! s:tmux.is_running()
@latentflip
latentflip / 1-description.md
Created April 27, 2012 10:27
Fancy split navigation with vim and tmux
  • In vim I have split navigation mapped to ctrl+h/j/k/l.
  • In tmux I navigate splits with prefix + ctrl+h/j/k/l.
  • Ideally I would be able to navigate between vim and tmux splits transparently using only ctrl+h/j/k/l.
  • I haven't figured that out yet, but I have figured out how to jump out of vim into the next tmux split if I am at the boundary of vim and tmux, without having to prefix jump, which is pretty ace. ie:
    *=cursor position
    
    -----------            -----------            -----------                  -----------
@MicahElliott
MicahElliott / colortrans.py
Created November 29, 2010 07:57
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code