Skip to content

Instantly share code, notes, and snippets.

@nosmall
nosmall / Win_Server_2022_Evaluation_to_full_version.md
Created April 16, 2023 11:11
Upgrade Windows Server 2022 Evaluation (Eval) to Full Version Standard or Datacenter
@pabloviera15
pabloviera15 / stuns
Created December 16, 2020 00:33 — forked from zziuni/stuns
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@mlabonne
mlabonne / merge_peft.py
Last active May 6, 2024 16:20
Merge base model and peft adapter and push it to HF hub
# Example usage:
# python merge_peft.py --base_model=meta-llama/Llama-2-7b-hf --peft_model=./qlora-out --hub_id=alpaca-qlora
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
import argparse
def get_args():
@mcaskill
mcaskill / wp-ajax.php
Last active May 6, 2024 16:20 — forked from yllus/admin-ajax.php
WordPress : A drop-in replacement for admin-ajax.php that is optimized for visitor-only AJAX requests.
<?php
/**
* WordPress Ajax Process Execution
*
* This file is a near-identical copy of {@see wp-admin/admin-ajax.php} from WordPress v6.3.0.
*
* Differences:
* 1. Constant `WP_ADMIN` is set to FALSE, by default.
* 2. WordPress action 'admin_init' is replaced with custom action 'ajax_init'.
* 4. Custom actions hooked on 'admin_init' are not executed.
@UnaNancyOwen
UnaNancyOwen / GLEW1.11.0.md
Last active May 6, 2024 16:20
Install GLEW for Windows
@mignonstyle
mignonstyle / markdown-cheatsheet.md
Last active May 6, 2024 16:19
Markdown記法 チートシート

Block Elements ## Headers 見出し 先頭に#をレベルの数だけ記述します。 ```

見出し1

見出し2

見出し3

見出し4

見出し5
見出し6
## 見出し2
### 見出し3
#### 見出し4
##### 見出し5
###### 見出し6 ## Block 段落 空白行を挟むことで段落となります。 ```
段落1
(空行)
段落2
``` 段落1 段落2 ## Br 改行 改行の前に半角スペース` `を2つ記述します。 ```
hoge
fuga(スペース2つ)
piyo
``` hoge
fuga piyo ## Blockquotes 引用 先頭に`&gt;`を記述します。ネストは`&gt;`を多重に記述します。 ```
&gt; 引用 &gt; 引用
&gt;&gt; 多重引用
``` &gt; 引用 &gt; 引用
&gt;&gt; 多重引用 ## Code コード `` `バッククオート` `` 3つ、あるいはダッシュ`~`3つで囲みます。 ```
print 'hoge'
``` ```
print 'hoge'
``` ### インラインコード `` `バッククオート` `` で単語を囲むとインラインコードになります。 ```
これは `インラインコード`です。
``` これは `インラインコード`です。 ## pre 整形済みテキスト 半角スペース4個もしくはタブで、コードブロックをpre表示できます ``` class Hoge def hoge print 'hoge' end end
``` class Hoge def hoge print 'hoge' end end ## Hr 水平線 アンダースコア`_` 、アスタリスク`*`、ハイフン`-`などを3つ以上連続して記述します。 ```
hoge
***
hoge
___
hoge
---
``` hoge
***
hoge
___
hoge
--- # Lists ## Ul 箇条書きリスト ハイフン`-`、プラス`+`、アスタリスク`*`のいずれかを先頭に記
@jakub-g
jakub-g / async-defer-module.md
Last active May 6, 2024 16:18
async scripts, defer scripts, module scripts: explainer, comparison, and gotchas

<script> async, defer, async defer, module, nomodule, src, inline - the cheat sheet

With the addition of ES modules, there's now no fewer than 24 ways to load your JS code: (inline|not inline) x (defer|no defer) x (async|no async) x (type=text/javascript | type=module | nomodule) -- and each of them is subtly different.

This document is a comparison of various ways the <script> tags in HTML are processed depending on the attributes set.

If you ever wondered when to use inline <script async type="module"> and when <script nomodule defer src="...">, you're in the good place!

Note that this article is about <script>s inserted in the HTML; the behavior of <script>s inserted at runtime is slightly different - see Deep dive into the murky waters of script loading by Jake Archibald (2013)

Introduction

During my daily work, I need to resolve server/domains against several different nameservers based upon network connections. Normally Network Manager and the system handles this quite well based upon the DNS provided by the dhcp on the connection.

However, I have some unique cases where I need to use multiple name servers on a single connection for a single connection. This is not normally something to worry about because dns forwards to other name servers, if configured to, until a response is returned.

@vdegenne
vdegenne / install-chrome-os.md
Last active May 6, 2024 16:17
Install Chrome OS on a System

Install Chrome OS on a System (usb or dual boot)

  1. Make sure you have wget, curl, dpkg, tar, cgpt and pv installed on your system (use yay -S vboot-utils to install cgpt on arch).

  2. Download brunch

    1. Run bash brunch-toolkit-main.sh (script from https://github.com/WesBosch/brunch-toolkit) and select "2) Compatibility Check". Note the codename (e.g. Rammus) then download the latest brunch release (the archive is saved in Downloads directory !)

    2. If it didn't work, download the latest release from https://github.com/sebanc/brunch and save it in Downloads directory (no need to extract the archive).

@gtx28
gtx28 / Pimox7to8.txt
Last active May 6, 2024 16:17
Pimox7 to PVE8 upgrade
***Pi-Mox setup on raspberry pi 4b (cm4 you will need add the appropriate steps for your hw setup)
***None of this is "Prod" ready so use at your own risk, your VM's/Containers are your own responsibility. You should already have adequate backups etc.
***Raspberry PI OS setup
Install raspbian x64 lite on raspberry pi
pull the latest copy of Raspberry PI OS x64 lite based on debian 11 bullseye from here: https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit
open imager, click choose os, scroll to the bottom and select custom. open the image "2023-05-03-raspios-bullseye-arm64-lite.img.xz"