Skip to content

Instantly share code, notes, and snippets.

View winkidney's full-sized avatar
💥
boom

Ji Qu winkidney

💥
boom
View GitHub Profile
@winkidney
winkidney / Antminer_S19_XP_6060_API.md
Created October 28, 2025 06:35 — forked from s0kil/Antminer_S19_XP_6060_API.md
Antminer S19 XP - 6060 API Command Reference - Fri Feb 7 18:12:53 CST 2025 - 20250208020137

6060 API Command Reference

This document provides a comprehensive list of all commands supported by the 6060 API, as extracted from the decompiled code.

Fan Control

Command Description Example
/fan-<value> Sets fan PWM (speed) value (1-99) /fan-80
@winkidney
winkidney / image-pack.py
Last active December 12, 2019 14:18
image-pack
from PIL import Image
def pixelated(file_name, granularity=16):
original = Image.open(file_name)
img_small = original.resize((granularity, granularity), resample=Image.BILINEAR)
result = img_small.resize(original.size, Image.NEAREST)
return original, result
@winkidney
winkidney / sexy_primes.py
Created May 17, 2019 15:18
sexy_primes solution
def get_sexy_primes_table(max_number):
prime = [True] * (max_number + 1)
p = 2
while p * p <= max_number:
if prime[p] is True:
for i in range(p * 2, max_number + 1, p):
prime[i] = False
p = p + 1
prime_table = prime
return prime_table
# Steam Start
173.223.87.13 help.steampowered.com
23.33.255.124 store.steampowered.com
23.33.255.124 steamcommunity.com
23.4.240.26 steamcommunity-a.akamaihd.net
184.28.218.74 steamuserimages-a.akamaihd.net
184.25.205.16 steamcdn-a.akamaihd.net
184.25.205.19 cdn.akamai.steamstatic.com
# Steam End
@winkidney
winkidney / daemon.service
Created October 19, 2017 06:28
systemd配置文件范例
[Unit]
Description=the server
After=network.target
[Service]
WorkingDirectory=/
ExecStart=/usr/bin/ls
Restart=on-failure
[Install]
@winkidney
winkidney / emacs-cheat-sheet.md
Last active August 1, 2018 04:55 — forked from dherman/emacs-cheat-sheet.md
My emacs cheat sheet

In penance for cracking stupid jokes on Twitter, here's my Emacs cheat sheet. Emacs has a steep learning curve, so I've tried to order them by importance so you could learn them in stages.

One overall rule of thumb: pay attention to the minibuffer (the line at the bottom of the editor). It will often guide you through a process, and also gives you hints about what state you're in, such as the middle of a multi-chord sequence.

The other rule of thumb: when in doubt, C-g it out.

Basics (mandatory)

You simply can't get by without having these at your fingertips.

request = new XMLHttpRequest()
// 将下面的IP地址改成除了当前机器以外的IP地址
request.open("GET", "http://192.168.49.16/api/v2/deployment/host/heartbeat")
request.onload = function(){console.log("success");}
request.onerror = function(){console.log("error");}
request.send()
// 观察输出,有可能是success或者error
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>ArtStation - Picks</title>
<description>Showcase. Discover. Connect.</description>
<link>https://www.artstation.com/</link>
<language>en-us</language>
<atom:link rel="self" type="application/rss+xml" href="https://www.artstation.com/artwork.rss"/>
<item>
<title>ⓒ 2016 MARVEL ⓒ Netmarble Games Corp. &amp; Developed by Netmarble Monster Inc. 2016 All Rights