Skip to content

Instantly share code, notes, and snippets.

View ketanarlulkar's full-sized avatar
🎯
Focusing

Ketan ketanarlulkar

🎯
Focusing
View GitHub Profile
@ketanarlulkar
ketanarlulkar / 1b-cooperatively-scheduled-asyncio-await.py
Last active September 15, 2017 04:12 — forked from yeraydiazdiaz/1b-cooperatively-scheduled-asyncio-await.py
Understanding use of AsyncIO Library in Python
import time
import asyncio
start = time.time()
def tic():
return 'at %1.1f seconds' % (time.time() - start)
@ketanarlulkar
ketanarlulkar / About.md
Last active June 22, 2017 07:09
An introduction to bash completion

One of the nicest facilities of the modern shell is the built in "completion" support. These facilities allow you to complete commands and their arguments easily. Read on for a brief introduction to adding your own command completions. Most shells allow command completion, typically bound to the TAB key, which allow you to complete the names of commands stored upon your PATH, file names, or directory names. This is typically used like so:

  `ls /bo[TAB]`

When you press the TAB key the argument /bo is automatically replaced with the value /boot.

  1. Install hdparm tool
@ketanarlulkar
ketanarlulkar / NVMe-cli commands.md
Last active March 20, 2017 05:18
Quick list of NVMe-cli commands

NVMe-cli commands

Undertemperature

  1. Get Default Undertemperature Threshold sudo nvme admin-passthru /dev/nvme0 -o 0xA --cdw10=0x104 --cdw11=0x100000 -s
  2. Get Current Undertemperature Threshold sudo nvme admin-passthru /dev/nvme0 -o 0xA --cdw10=0x4 --cdw11=0x100000 -s
  3. Set Undertemperature Threshold sudo nvme admin-passthru /dev/nvme0 -o 0x9h --cdw10=0x4 --cdw11=0x10$temp -s
  4. Set Persist Undertemperature Threshold sudo nvme admin-passthru /dev/nvme0 -o 0x9h --cdw10=0x80000004 --cdw11=0x10$temp -s

Overtemperature

  1. Get Default Overtemperature Threshold sudo nvme admin-passthru /dev/nvme0 -o 0xA --cdw10=0x104 --cdw11=0x0 -s