Skip to content

Instantly share code, notes, and snippets.

@abelcallejo
abelcallejo / README.md
Last active May 6, 2024 02:39
Create bootable Linux USB using Mac

Creating bootable Linux USB using Mac

mac

CentOS, Ubuntu, Slackware, etc. Whatever Linux-based OS it is, you can create a bootable USB for it by using a Mac.

1. Prepare the .iso file

Download it, copy it, whatever it takes to prepare that Linux-based OS .iso file

2. Convert the .iso file into a .img.dmg

@memchr
memchr / import_env
Created August 28, 2023 18:43
import_env
#!/usr/bin/env bash
set -e
[[ -n $HYPRLAND_DEBUG_CONF ]] && exit 0
USAGE="\
Import environment variables
Usgae: $0 <command>
Commands:
@wanlce
wanlce / emby.md
Last active May 6, 2024 02:38
Linux 下 Emby客户端破解教程

Linux 下 Emby客户端破解教程

emby 客户端是需要付费才能使用的, 市面上也有许多三方修改版或者用第三方客户端来绕过这个限制,但是基本都是移动端设置或windows,很少有关于 linux 版的客户端的,今天我来教大家自己动手,丰衣足食(通用版)

解锁前 Untitled

以下仅供个人研究使用

@tanaikech
tanaikech / submit.md
Last active May 6, 2024 02:34
Redeploying Web Apps without Changing URL of Web Apps for new IDE

Redeploying Web Apps without Changing URL of Web Apps for new IDE

At March 15, 2021, one endpoint is created for one deployment. Ref By this, when you redeploy "Web Apps", the endpoint is changed. Because the deployment ID is changed. It seems that this it the new specification. In this report, I would like to introduce the method for redeploying Web Apps without changing the URL of Web Apps for new IDE.

Deploy Web Apps

  1. Open "New deployment" dialog with "Deploy" -> "New deployment".

  2. Select "Web app" for "Select type".

@hidroh
hidroh / avd.sh
Last active May 6, 2024 02:31
Handy bash script to prompt for an Android virtual device (AVD) selection and launch it. Assuming that Android SDK has been set up and is in user PATH.
emulator -list-avds | cat -n
printf "Select AVD: "
read index
avd=$(emulator -list-avds | sed "${index}q;d")
echo "Selected $avd"
emulator -netdelay none -netspeed full -avd $avd
@subfuzion
subfuzion / curl.md
Last active May 6, 2024 02:31
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.

@itzmeanjan
itzmeanjan / google-benchmark-with-libpfm.md
Last active May 6, 2024 02:28
Using Performance Monitoring Unit(s), when benchmarking with google-benchmark.

Background

I'm demonstrating following on a machine, running Ubuntu 22.04 with GNU/Linux kernel 5.19.0.

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.2 LTS
Release:	22.04
@obfusk
obfusk / bdiff.sh
Last active May 6, 2024 02:28
diff + bat
#!/bin/bash
diff -Naur "$@" | bat -p -l diff
@phineas-pta
phineas-pta / xoa_dau.md
Last active May 6, 2024 02:22
xoá dấu tiếng Việt với Python

xoá dấu tiếng Việt với Python

phương pháp nhanh hơn và không cần cài thêm package

code hoàn chỉnh:

import unicodedata

BANG_XOA_DAU = str.maketrans(
@druska
druska / engine.c
Created September 17, 2018 15:18
Quant Cup 1's winning order book implementation
/*****************************************************************************
* QuantCup 1: Price-Time Matching Engine
*
* Submitted by: voyager
*
* Design Overview:
* In this implementation, the limit order book is represented using
* a flat linear array (pricePoints), indexed by the numeric price value.
* Each entry in this array corresponds to a specific price point and holds
* an instance of struct pricePoint. This data structure maintains a list