Skip to content

Instantly share code, notes, and snippets.

View leiless's full-sized avatar
🎯
Focusing

Fishbone° leiless

🎯
Focusing
  • China
  • 00:29 (UTC +08:00)
View GitHub Profile
@dideler
dideler / bot.rb
Last active October 23, 2025 16:33
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active October 25, 2025 18:24
crack activate Office on mac with license file
@extremecoders-re
extremecoders-re / qemu-networking.md
Last active September 3, 2025 00:10
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@magnetikonline
magnetikonline / README.md
Last active November 24, 2024 15:55
Bash getopt long options with values usage example.

Bash getopt long options with values usage example

#!/bin/bash -e

ARGUMENT_LIST=(
  "arg-one"
  "arg-two"
  "arg-three"
)
@tetsu-koba
tetsu-koba / 00_ioctl_golang
Created January 15, 2018 08:58
Golang ioctl sample
Golang ioctl sample
@scalaview
scalaview / polipo.sh
Last active March 15, 2025 13:08
Convert Shadowsocks into an HTTP proxy
First run polipo with parent proxy set to Shadowsocks:
apt-get install polipo
service polipo stop
polipo socksParentProxy=localhost:1080
Then you can play with the HTTP proxy:
http_proxy=http://localhost:8123 apt-get update
@s8sg
s8sg / single_p_multi_c_buffer.c
Last active September 4, 2022 10:03
A blazing fast single producer multiple consumer lockless queue
/* NOTE: The design decision of the req pool is tuned to get the
* best possible performance. Below point describes
* the design decisions:
* >> reqpool is a buffer queue where the producer adds at the start
* and consumers consume from the end
* >> it is strictly one consumer and multiple producers queue
* >> It is unbounded queue and avoids any resource allocation on heap
* >> It is lockless and use atomic operation to avoid race condition
* for consumers
*/
@ndauten
ndauten / create-highsierra-iso.sh
Created October 31, 2017 02:43
This gist details how to generate a bootable High Sierra installer ISO image. It solves a few differences from the Sierra install. It assumes the Install downloaded into the directory with the script.
src=./Install\ macOS\ High\ Sierra.app
hdiutil attach \
./Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/InstallESD.dmg \
-noverify -nobrowse -mountpoint /Volumes/install_app
hdiutil create -o /tmp/HighSierra.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -nobrowse -mountpoint \
/Volumes/install_build
@jiahuif
jiahuif / main.go
Created October 16, 2017 06:00
golang: tunnel tcp over socks5
package main
import (
"flag"
"io"
"net"
"time"
log "github.com/sirupsen/logrus"
"golang.org/x/net/proxy"
@asukakenji
asukakenji / 0-go-os-arch.md
Last active October 25, 2025 20:39
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

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

GOOS Values

GOOS Out of the Box
aix
android