Skip to content

Instantly share code, notes, and snippets.

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@matthewpick
matthewpick / aws_logging_util.py
Last active April 25, 2024 06:23
AWS Lambda universal logging formatter (retain aws_request_id in log output)
import logging
import os
def setup_logging_format(log_level=logging.INFO, override_existing_loggers=True):
"""
Logger formatter that works locally and in AWS lambda
:param log_level: Level of logging
:param override_existing_loggers: Flag for overriding the formatting of all existing loggers
@afternoon
afternoon / rename_js_files.sh
Created February 15, 2014 18:04
Rename .js files to .ts
find app/src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} \;
@pxwise
pxwise / nginx.conf
Last active April 25, 2024 06:20
HTML5 pushState nginx configuration
# HTML5 pushState nginx configuration
#
# @see: http://stackoverflow.com/a/30515169/1774183
#
# Server block for a client side app with directories:
#
# /
# /foo
# /foo/bar
# /foo/bar/baz
@joulgs
joulgs / terminal.txt
Last active April 25, 2024 06:16
How install libssl1.1 on ubuntu 22.04
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
@chrisgillis
chrisgillis / ssl_smtp_example.go
Created April 16, 2014 14:48
Golang SSL SMTP Example
package main
import (
"fmt"
"log"
"net"
"net/mail"
"net/smtp"
"crypto/tls"
)
@nafiesl
nafiesl / how_to_get_telegram_chat_id.md
Created December 20, 2023 11:49
How to get Telegram Bot Chat ID

How to get Telegram Bot Chat ID

Create a Telegram Bot and get a Bot Token

  1. Open Telegram application then search for @BotFather
  2. Click Start
  3. Click Menu -> /newbot or type /newbot and hit Send
  4. Follow the instruction until we get message like so
    Done! Congratulations on your new bot. You will find it at t.me/new_bot.
    
@maiha
maiha / sse.md
Last active April 25, 2024 06:14
Nginx configuration Cheat Sheet

nginx

location /sse/ {
  # enables EventSource support
  proxy_http_version 1.1;
  proxy_set_header Connection "";

  proxy_buffering off;
}
@imba-tjd
imba-tjd / .Cloud.md
Last active April 25, 2024 06:14
☁️ 一些免费的云资源

IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。

其他人的集合

@Artefact2
Artefact2 / README.md
Last active April 25, 2024 06:14
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggerganov/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix