Skip to content

Instantly share code, notes, and snippets.

View ihainan's full-sized avatar
😉
Hey

Jigao Fu ihainan

😉
Hey
View GitHub Profile
@AndnixSH
AndnixSH / qnap_standby_debug.sh
Last active November 16, 2023 00:57
QNAP standby debug fix
# https://www.qnap.com/en/how-to/faq/article/how-do-i-find-out-which-process-prevents-the-hard-drives-from-standby-mode
# wget https://eu1.qnap.com/Storage/tsd/utility/standby_debug.sh;sh standby_debug.sh
binary=""
case "$(uname -m)" in
*x86_64*)
echo "Arch: x86_64"
binary=https://download.qnap.com/Storage/tsd/utility/Disk_Standby_Debug_x86_64/Disk_Standby_Debug
;;
@XargonWan
XargonWan / japanese_locale_enabler.sh
Last active May 4, 2024 20:25
Enable Japanese locale on Steam Deck
#!/bin/bash
# This script is enabling (uncommenting) the Japanese locale and regenerates them
sudo steamos-readonly disable
sudo pacman-key --init
sudo pacman-key --populate archlinux
sudo pacman -S glibc
sudo sed -i "s%#ja_JP.UTF-8 UTF-8%ja_JP.UTF-8 UTF-8%" /etc/locale.gen
sudo locale-gen
@ts-sz
ts-sz / reset-proxmox-cluster.sh
Created September 29, 2021 18:21 — forked from nderjung/reset-proxmox-cluster.sh
Reset proxmox cluster
#/bin/bash -xe
systemctl stop pvestatd.service
systemctl stop pvedaemon.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
sqlite3 /var/lib/pve-cluster/config.db "delete from tree where name = 'corosync.conf';"
@BenWoodford
BenWoodford / lh2.md
Last active October 17, 2023 02:33
Lighthouse 2.0 GATT Information

All control characteristics are under Service 00001523-1212-EFDE-1523-785FEABCD124

Characteristics

Mode = 00001524-1212-EFDE-1523-785FEABCD124 (READ, WRITE, NOTIFY)

Identify = 00008421-1212-EFDE-1523-785FEABCD124 (WRITE)

Power State = 00001525-1212-EFDE-1523-785FEABCD124 (WRITE, newer firmware also had READ and NOTIFY)

@zopieux
zopieux / README.md
Last active May 2, 2024 15:12
QNAP TS-453 Pro: LCD, LEDs, fan & buttons

QNAP TS-453 Pro: LCD, LEDs, fan & buttons

QNAP NAS model TS-453 Pro has limited documentation on how to control its various peripherals, namely:

  • the front LCD display, a 2 row, 16 column blue & white LCD display, and its two menu buttons ("ENTER", "SELECT")
  • the front LEDs "STATUS" (red & green) & "USB" (blue)
  • the 4 "disk error" LEDs (red)
  • the front "USB COPY" button
  • the main rear fan
@ElementW
ElementW / uexplode.py
Created January 30, 2018 20:14
Python3 script to extract music from UE4 .uexp files
#!/usr/bin/env python3
import sys, os, errno
def mkdir_p(path):
try:
os.makedirs(path)
except OSError as exc:
if exc.errno == errno.EEXIST and os.path.isdir(path):
pass
@wanglf
wanglf / vscode-extension-offline.md
Last active May 3, 2024 06:06
Download VS Code extensions as VSIX

How to use?

  • Copy content of vsix-bookmarklet, create a bookmark in your browser.
  • Navigate to the web page of the VS Code extension you want to install.
  • Click the bookmark you just created, then click the download button.
    download
  • After download finished, rename the file extension to *.vsix.
  • In VS Code, select Install from VSIX... in the extension context menu.
    vsc
@hardik-vala
hardik-vala / build.sbt
Created March 7, 2016 03:59
Adding Stanford CoreNLP to build.sbt
name := "myproject"
version := "1.0"
libraryDependencies ++= Seq(
"edu.stanford.nlp" % "stanford-corenlp" % "3.6.0",
"edu.stanford.nlp" % "stanford-corenlp" % "3.6.0" classifier "models"
)
@alphamu
alphamu / AA Transition App theme between light and dark themes
Last active September 9, 2022 21:59
Example of how to change themes at runtime with a smooth animation. In this example, we just switch between a light and a dark theme. The activity animation is defined in the theme and as such will be default on all activities with the set theme. [Demo Video here](http://youtu.be/Ps0phswbHls).
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
public class TransitionThemeActivity extends AppCompatActivity implements View.OnClickListener {
//1. Write an example program to demonstrate that
//package com.horstmann.impatient
//is not the same as
//package com
//package horstmann
//package impatient
// File: Demo1.scala
package com {
package horstmann {