Skip to content

Instantly share code, notes, and snippets.

@damico
damico / test-rocm.py
Created April 10, 2023 18:54
Script for testing PyTorch support with AMD GPUs using ROCM
import torch, grp, pwd, os, subprocess
devices = []
try:
print("\n\nChecking ROCM support...")
result = subprocess.run(['rocminfo'], stdout=subprocess.PIPE)
cmd_str = result.stdout.decode('utf-8')
cmd_split = cmd_str.split('Agent ')
for part in cmd_split:
item_single = part[0:1]
item_double = part[0:2]
@davecan
davecan / open_powershell_here.md
Last active May 3, 2024 16:45
How to enable "Open PowerShell Here" context menu in Windows 10
@natyusha
natyusha / Naty's FFXIV Endwalker Add-ons, Plugins and Mods.md
Last active May 3, 2024 16:45
All the third party add-ons, plugins and mods I use for FFXIV.

Last Updated: Patch 6.58

The program which most people use for parsing in FFXIV and several other MMOs. For an open source alternative consider using IINACT though configuring it won't be covered here.

Options

  • Main Table Encounters
    • General
      • Uncheck: Number of seconds to wait after the last combat action to begin a new encounter.
      • Uncheck: Number of seconds to wait after the last combat action to pause the encounter duration.

Plugins

env:
TERM: xterm-256color
font:
size: 14
normal:
family: "Dank Mono"
style: Regular
bold:
style: Bold
@davislf2
davislf2 / css_common.css
Last active May 3, 2024 16:40
css_common.css #css
.red_class{
color:red
}
.highlight_class{
background-color:palegreen
}
.highlight_robot_class{
background-color:gold
}
@loneicewolf
loneicewolf / snippets.sh
Created November 1, 2022 10:38
bash snippets - keywords/tags -- bash commands, sh,shell,snippets,one-liners
# From Adam Liss's comment
# https://stackoverflow.com/a/9387914/14346786
# Read a file using a bash script
i=0;while read l;do ((i=i+1));echo "$i:$l";done < file.txt
# alphabet
az=$(echo {a..z} | tr -d ' \n\t\v')
@callaginn
callaginn / ajax-contact-form.js
Last active May 3, 2024 16:38
Shopify Ajax Contact Form
// Before implementing this, you'll need to contact Shopify support and ask them to turn off Google's ReCaptcha
// for your Shopify store's contact forms. Otherwise, it will redirect to the captcha's verification page.
// Retrieves input data from a form and returns it as a JSON object:
function formToJSON(elements) {
return [].reduce.call(elements, function (data, element) {
data[element.name] = element.value;
return data;
}, {});
}
// A small test program of me trying Odin + Box2D + Raylib
// Made during this stream: https://www.youtube.com/watch?v=LYW7jdwEnaI
// I used these bindings https://github.com/cr1sth0fer/odin-box2d download them and put them in a sub-folder "box2d" next to this file.
// Then you can build using `odin run .`
package game
import b2 "box2d"
import rl "vendor:raylib"
@gustavomdsantos
gustavomdsantos / AutoHotKey script - Always-on-top.ahk
Last active May 3, 2024 16:32
AutoHotKey script that make any window Always-on-Top on Windows.
; Press Ctrl+Shift+Space to set any currently active window to be always on top.
; Press Ctrl+Shift+Space again set the window to no longer be always on top.
; Source: https://www.howtogeek.com/196958/the-3-best-ways-to-make-a-window-always-on-top-on-windows
^+SPACE::
WinGetTitle, activeWindow, A
if IsWindowAlwaysOnTop(activeWindow) {
notificationMessage := "The window """ . activeWindow . """ is now always on top."
notificationIcon := 16 + 1 ; No notification sound (16) + Info icon (1)
}
@Zekfad
Zekfad / conventional-commits.md
Last active May 3, 2024 16:32
Conventional Commits Cheatsheet

Quick examples

  • feat: new feature
  • fix(scope): bug in scope
  • feat!: breaking change / feat(scope)!: rework API
  • chore(deps): update dependencies

Commit types

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Changes which doesn't change source code or tests e.g. changes to the build process, auxiliary tools, libraries