Skip to content

Instantly share code, notes, and snippets.

@bitsurgeon
bitsurgeon / nvidia.md
Last active April 27, 2024 16:48
install Nvidia driver on Ubuntu with Secure Boot

Install Nvidia Driver on Ubuntu 18.04.3

Secure Boot

This section applies to machines with Secure Boot, such as ThinkPad.

  1. Before installation, switch to "Discrete Graphics" in BIOS, if both Intel and Nvidia graphics are present.
  2. During installation, make sure to select the "Install third-party software for graphics and Wi-Fi hardware and addition media formats" in "Updates and other software" screen.
  3. Select "Configure Secure Boot", and set password.
  4. Continue Ubuntu installation as normal.
@JoveYu
JoveYu / lenovo-fn-q.sh
Last active April 27, 2024 16:45
Linux Lenovo Fn+Q Power Mode Script
#!/bin/bash
ACPI_BALANCE="\_SB.PCI0.LPC0.EC0.VPC0.DYTC 0x000FB001"
ACPI_POWER="\_SB.PCI0.LPC0.EC0.VPC0.DYTC 0x0012B001"
ACPI_ECO="\_SB.PCI0.LPC0.EC0.VPC0.DYTC 0x0013B001"
ACPI_MODE="\_SB.PCI0.LPC0.EC0.SPMO"
MODE=$(sudo sh -c "echo '$ACPI_MODE' > /proc/acpi/call; tr -d '\0' < /proc/acpi/call")
MODE=${MODE:2}
TARGET=$(((MODE+1)%3))
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 16:45
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@diego3g
diego3g / settings.json
Last active April 27, 2024 16:43
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {
@rendyanthony
rendyanthony / Install_ADE_on_Fedora.md
Last active April 27, 2024 16:43
Install Adobe Digital Editions (ADE) and Calibre DeDRM on Fedora
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 27, 2024 16:42
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@y0ngb1n
y0ngb1n / docker-registry-mirrors.md
Last active April 27, 2024 16:40
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+