Skip to content

Instantly share code, notes, and snippets.

@dopey
dopey / main.go
Last active April 30, 2024 15:59 — forked from denisbrodbeck/main.go
How to generate secure random strings in golang with crypto/rand.
package main
import (
"crypto/rand"
"encoding/base64"
"fmt"
"io"
"math/big"
)
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active April 30, 2024 15:57
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@lummie
lummie / enum.go
Last active April 30, 2024 15:57
Golang Enum pattern that can be serialized to json
package enum_example
import (
"bytes"
"encoding/json"
)
// TaskState represents the state of task, moving through Created, Running then Finished or Errorred
type TaskState int
@nikolovlazar
nikolovlazar / keybindings.json
Created April 29, 2024 01:12
VSCode key bindings to navigate like Neovim
[
// Navigation
{
"key": "ctrl-h",
"command": "workbench.action.navigateLeft"
},
{
"key": "ctrl-l",
"command": "workbench.action.navigateRight"
},
atl*CLI> core show help
! -- Execute a shell command
acl show -- Show a named ACL or list all named ACLs
ael reload -- Reload AEL configuration
ael set debug {read|tokens|macros|contexts|off} -- Enable AEL debugging flags
agi dump html -- Dumps a list of AGI commands in HTML format
agi exec -- Add AGI command to a channel in Async AGI
agi set debug [on|off] -- Enable/Disable AGI debugging
agi show commands [topic] -- List AGI commands or specific help
aoc set debug -- enable cli debugging of AOC messages
@pixiesky
pixiesky / magento2.nginx.conf
Last active April 30, 2024 15:54
Magento 2.x Nginx (with PHP-FPM) development template.
# Magento 2.x Nginx (and PHP-FPM) development template. (Taken from the official repo and slightly edited)
# READ THROUGH FIRST! See video https://youtu.be/22RF1g_yjFI
# Andy Myers
upstream fastcgi_backend {
# use tcp connection
# server 127.0.0.1:9000;
# or socket
# This is different for different distrbutions
server unix:/PATH/TO/php-fpm.sock;

Preparing the AWQ-Quantized Model

You will need more than 24 GB of VRAM to quantize a 7B parameter model like mistral this way. I didn't have that, so I borrowed some H100 time on vast.ai for 5 dollars.

On an cloud gpu, run a docker instance from an image created by the following script:

git lfs install
git clone https://github.com/NVIDIA/TensorRT-LLM.git -b v0.8.0
cd TensorRT-LLM
@Raulebc
Raulebc / MySQL:regiones-provincias-comunas-chile.sql
Last active April 30, 2024 15:51
MySQL-Chile:regiones-provincias-comunas
Script comunas, regiones, provincias Junio 2022
DROP TABLE IF EXISTS `comunas`;
CREATE TABLE `comunas` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`comuna` varchar(64) NOT NULL,
`provincia_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=346 DEFAULT CHARSET=utf8;

An guide how to activate Windows 11 Pro for free

Why?

Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet

Am i also able to switch from any other edition to Pro?

The answer is yes! You can switch from almost any edition to Pro completely for free!

Note for users with unactivated Pro edition

People which already have Pro, but not activated, can skip to this step.

Getting started

What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key: