Skip to content

Instantly share code, notes, and snippets.

@choco-bot
choco-bot / Update-AUPackages.md
Last active April 25, 2024 10:47
Update-AUPackages Report #powershell #chocolatey
@jauderho
jauderho / Public time servers with anycast NTP support.md
Last active April 25, 2024 10:47
This is a curated list of NTP time servers that have anycast IP addresses. This is useful for devices/appliances that can only use IP addresses for defined NTP servers.

Cloudflare (AS13335)

server 162.159.200.123

server 162.159.200.1

Facebook (AS32934)

server 129.134.28.123 # SJC

@fjudith
fjudith / kubernetes_service_session_affinity.md
Last active April 25, 2024 10:46
Enable Session Affinity (a.k.a Sticky Session) to Kubernetes service
@duchelle5093
duchelle5093 / hello.c
Created April 25, 2024 10:41
mon hello world
int main ()
{
print("hello world");
return 0;
}
@TrueCarry
TrueCarry / check.ts
Last active April 25, 2024 10:41
TON Connect V2 Proof verification
async function check(req, res) {
const walletInfo = req.body.walletInfo as Wallet
if (!walletInfo?.connectItems?.tonProof) {
return res.status(httpStatus.BAD_REQUEST).send({ ok: false })
}
const proof = walletInfo.connectItems.tonProof as TonProofItemReplySuccess
if (!proof) {
return res.status(httpStatus.BAD_REQUEST).send({ ok: false })
}
@chrislemke
chrislemke / compute_metrics.py
Created July 15, 2021 12:40
Compute metrics for training process
from datasets import load_metric
meteor = load_metric('meteor')
rouge = load_metric('rouge')
def compute_metrics(prediction):
labels_ids = prediction.label_ids
pred_ids = prediction.predictions
pred_str = tokenizer.batch_decode(pred_ids, skip_special_tokens=True)
@noelboss
noelboss / git-deployment.md
Last active April 25, 2024 10:38
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 25, 2024 10:38
Complete Recent Discord Quest

Complete Recent Discord Quest

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
  2. Join a vc
  3. Stream any window (can be notepad or something)
  4. Press Ctrl+Shift+I to open DevTools
  5. Go to the Console tab
  6. Paste the following code and hit enter:
let wpRequire;
@wangruohui
wangruohui / intel-nvidia.md
Last active April 25, 2024 10:38
Intel for display, Nvidia for computing

Intel for display, NVIDIA for computing

This guide will show you how to use Intel graphics for rendering display and NVIDIA graphics for CUDA computing on Ubuntu 18.04 / 20.04 desktop.

I made this work on an ordinary gaming PC with two graphics devices, an Intel UHD Graphics 630 plus an NVIDIA GeForce GTX 1080 Ti. Both of them can be shown via lspci | grep VGA.

00:02.0 VGA compatible controller: Intel Corporation Device 3e92
01:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)
@Hendrixer
Hendrixer / vsconfig.json
Created June 12, 2023 21:53
vs code config
{
"workbench.iconTheme": "vscode-icons",
"workbench.colorTheme": "One Dark Pro Darker",
"editor.tabSize": 2,
"editor.fontFamily": "'Fira Mono', Menlo, Monaco, 'Courier New', monospace",
"files.exclude": {
"**/.git": false
},
"editor.bracketPairColorization.enabled": true,