Skip to content

Instantly share code, notes, and snippets.

@TomaszGasior
TomaszGasior / dell-custom-fan-speed
Last active May 7, 2025 23:31
Custom fan speed for Dell Optiplex 7050 Micro on Fedora 37 with Intel Core i7-7700T
#!/bin/bash
export CPU_TEMP_THRESHOLD_FOR_FAN_SPEED_LOW=54
export CPU_TEMP_THRESHOLD_FOR_FAN_SPEED_HIGH=68
export SLEEP_TIME_SECS=10
export GET_CPU_TEMP_FILE=/sys/devices/platform/coretemp.0/hwmon/hwmon*/temp1_input
export SET_FAN_SPEED_FILE=/sys/devices/platform/dell_smm_hwmon/hwmon/hwmon*/pwm1
from datasets import load_dataset
from sentence_transformers.losses import CosineSimilarityLoss
from setfit import SetFitModel, SetFitTrainer
dataset = load_dataset("yelp_polarity")
print(dataset)
# Select N examples per class (8 in this case)
train_ds = dataset["train"].shuffle(seed=42).select(range(8 * 2))
@yonderbread
yonderbread / download-botw-wiiu.sh
Created December 8, 2020 01:20
Downloads parts for BOTW base game rom
curl --header 'Host: f24.megaup.net' --user-agent 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0' --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' --header 'Accept-Language: en-US,en;q=0.5' --referer 'https://megaup.net/51si/T_LOZ-BOTW-USA-LOADIINE-ZIPERTO.part1.rar' --header 'DNT: 1' --cookie 'filehosting=qrp5gj3tpmomjfamlqtdmotr7n' --header 'Upgrade-Insecure-Requests: 1' 'https://f24.megaup.net/51si/T_LOZ-BOTW-USA-LOADIINE-ZIPERTO.part1.rar?download_token=0df82780d4c7161483ff2639acc592ebd8fd5d30ab79aef0b199fb1ca895fa7b' --output 'T LOZ-BOTW-USA-LOADIINE-ZIPERTO.part1.rar' && curl --header 'Host: f24.megaup.net' --user-agent 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0' --header 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' --header 'Accept-Language: en-US,en;q=0.5' --referer 'https://megaup.net/51s0?pt=wVBFiRH6GUZggGYyX1EjMTorDlELffFQn1M4c4kQDPQ%3D' --header 'DN
@mrpeardotnet
mrpeardotnet / PVE-host-backup.md
Created December 17, 2019 18:03
Proxmox PVE Host Config Backup Script

Proxmox PVE Host Config Backup Script

This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.

The script will create backups using tar with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.

Create backup script file

To create backup script that will be executed every day we can create backup script in /etc/cron.daily/ folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:

touch /etc/cron.daily/pvehost-backup
@irustm
irustm / AngularVsReact.md
Last active April 8, 2024 09:47
Angular vs React

На случай важных переговоров

[11.01.18 18:47] [Forwarded from Алексей Охрименко]

  1. Google, Microsoft
  2. Typescript из коробки
  3. Единственный вреймворк с Dependency Injection из коробки
  4. Не нужно ничего React-ить и AngularJS-ифаить. Больше никаких оберток. jQuery плагины и D3 можно использовать на прямую
  5. Более современный фреймворк
@aliesbelik
aliesbelik / benchmarking-tools.md
Last active May 29, 2025 11:15
Benchmarking & load testing tools
@pmknutsen
pmknutsen / gist:7521a29fe8125c24eb3e
Last active February 24, 2021 01:56
HOWTO Run Sia host on Ubuntu server
#HOWTO Run Sia host on Ubuntu server
#Updated: 13 august, 2016
#Tested with Sia 1.0.2 and Ubuntu 16.04
#Update 13.08.2016: Changed from using supervisor to systemd
# Create user `siad`
adduser siad
su siad
@shockalotti
shockalotti / Go Golang - recursive function, fibonacci sequence
Created May 28, 2014 03:03
Go Golang - recursive function, fibonacci sequence
package main
import "fmt"
func fib(n uint) uint {
if n == 0 {
return 0
} else if n == 1 {
return 1
} else {
@msoap
msoap / Raspberry Pi httpd benchmark.md
Last active September 26, 2018 16:09
Raspberry Pi httpd benchmark with wrk

Raspberry Pi httpd benchmark

Total RPS

All:

               Go/fasthttp (10 thr): 930.0 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

Nginx (10 thr): 826.1 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

@revolunet
revolunet / angularjs.md
Last active April 21, 2025 07:22
BeerJS + AngularJS Paris le 25/2

AngularJS best ressources

Following the AngularJS PARIS meetup (25/2 à 19h à Paris with @sampaccoud @dzen @_kemar @tchack13 @vinz et @revolunet)

Here's our best AngularJS ressources : twitter, github, articles & blogs. Please comment and add your good stuff !