Skip to content

Instantly share code, notes, and snippets.

View COOLMSF's full-sized avatar

coolder COOLMSF

  • looking for devops, llm ops, sec ops job in China!
  • foobar
View GitHub Profile
@COOLMSF
COOLMSF / .Xdefaults
Created February 19, 2020 09:25 — forked from yevgenko/.Xdefaults
URxvt settings with solarized theme
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: false
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
@COOLMSF
COOLMSF / qemu_optionrom.md
Created February 17, 2021 15:58 — forked from mcastelino/qemu_optionrom.md
QEMU Option ROMS and booting from option rom

With seabios

  1. QEMU includes bundled option ROMs which are loaded by default unless a device is specifically setup with --romfile="".
  2. These options roms are bundled as binaries. The source code for the same can be found at http://ipxe.org/
  3. These options roms are useful for example when you want to PXE boot over a virtio-net device.

Here is an example of booting via Network PXE using the option ROM

qemu-system-x86_64 \
@COOLMSF
COOLMSF / go-os-arch.md
Created March 14, 2021 06:36 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.14.7 darwin/amd64.

A list of valid GOOS values

(Bold = supported by go out of the box, ie. without the help of a C compiler, etc.)

  • aix
  • android
@COOLMSF
COOLMSF / curl.md
Created May 26, 2021 13:35 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@COOLMSF
COOLMSF / README.en.md
Created September 18, 2021 01:23 — forked from niw/README.en.md
How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

How to run Windows 10 on ARM or Ubuntu for ARM64 in QEMU on Apple Silicon Mac

Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!

NOTE: that this is current, 8/19/2021 state.

Running Windows 10 on ARM

  1. Install Xcode from App Store or install Command Line Tools on your Mac
#include "select_sort.h"
#include <stdint.h>
int select_sort(void *arr, size_t nmember, size_t size, CompareFunc compare_func)
{
int index;
int typesize = size / nmember;
for (size_t i = 0; i < nmember; i++) {
index = get_array_max_index(arr + i * typesize, nmember - i,
@COOLMSF
COOLMSF / CharDev_READ_ME
Created December 5, 2021 03:26 — forked from ksvbka/CharDev_READ_ME
Char_dev - A char driver example
B1: Build charDev bang cach su dung lenh make.
B2: Xem major trong log bang lenh dmesg
B3: Chinh sua file loadcript.sh de phu hop voi major trong he thong
B4: Build va chay chuong trinh test kiem tra ket qua