Skip to content

Instantly share code, notes, and snippets.

View corenel's full-sized avatar
💭
I may be slow to respond.

Yusu Pan corenel

💭
I may be slow to respond.
View GitHub Profile
@toricls
toricls / lima-on-m1-mac-installation-guide.md
Last active April 25, 2024 15:30
Using Lima to run containers with containerd and nerdctl (without Docker Desktop) on M1 Macs

Lima (Linux virtual machines, on macOS) installation guide for M1 Mac.

Sep. 27th 2021 UPDATED

Now we can install patched version of QEMU via Homebrew (thank you everyone for the info!). Here is the updated instruction with it:

Used M1 Mac mini 2020 with macOS Big Sur Version 11.6.

1. Install QEMU & Lima

@naveenkrdy
naveenkrdy / AdobeAMDFix.md
Last active March 21, 2024 15:30
To fix adobe products crashes on AMD hackintosh

Adobe Crash Fix XLNC

Instructions

  1. Install needed adobe apps from adobe creative cloud.

  2. Open Terminal.

  3. Copy-paste the below command to your terminal and run it (enter password when asked).

@aca
aca / ideavim_actionlist.md
Created March 14, 2020 14:46
IdeaVim ActionList

IdeaVim 0.55.2

--- actions ---
$copy                                              <c-c> <c-ins>
$cut                                               <c-x> <s-del>
$delete                                            <del>
$lru
$paste                                             <c-v> <s-ins>
$redo                                              <c-s-z> <a-s-bs>
$searchweb
@2019ncovmemory
2019ncovmemory / capture_articles.py
Created February 5, 2020 18:25
Create screenshots of articles; work for WeChat articles with lazy loading.
'''
Usage: python archive_articles.py test.csv
Input: test.csv
name url
1 url1
2 url2
.....
output:
1.png
2.png
@slykar
slykar / docker-compose-hackintosh.md
Last active April 25, 2024 15:37
Docker and Docker Compose on AMD OSX Hackintosh via Docker Machine

Introduction

Docker.app will complain about incompatible processor, so we will use Docker Machine.

Instalation

Download Docker for Mac (Docker.app). It contains some binaries that are necessary.

brew install virtualbox docker-machine
@schmmd
schmmd / slurm-gpu-stats.py
Created November 20, 2019 19:08
Slurm GPU Stats
#!/usr/bin/env python
import os
import re
import subprocess
import socket
import sys
def pids_of_jid(jid):
result = subprocess.run(["sstat", "-p", "--format=PID", "-j", jid, "--noheader"], stdout=subprocess.PIPE)
@dvf
dvf / change-codec.md
Last active April 25, 2024 22:44
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@joshskidmore
joshskidmore / ubuntu-mate-gpd-micropc.sh
Created June 28, 2019 10:43
ubuntu-mate-gpd-micropc.sh
#!/usr/bin/env bash
# update
apt -y update
apt -y upgrade
apt -y dist-upgrade
# 5.2 mainline kernel
cd /tmp
wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.2-rc6/linux-headers-5.2.0-050200rc6_5.2.0-050200rc6.201906222033_all.deb
@yuq-1s
yuq-1s / imle.py
Last active February 1, 2022 09:27
[Implicit Maximum Likelihood Estimation](https://arxiv.org/abs/1809.09087) in 100 lines
import mxnet as mx
from mxnet import nd, autograd
from mxnet.gluon import nn
from mxnet.gluon.contrib.nn import Identity, Concurrent
from mxnet import gluon
import logging
def d(a, b):
return (a - b).norm()