Skip to content

Instantly share code, notes, and snippets.

========= ========== ===== =====
========= ============ ====== ======
=== === ==== ===== =====
=== ========= ====== ====== INSTALLIN' THAT SWEET SWEET
=== ======== ============= BIG IRON ON YOUR LINUX LAPTOP
=== ========= ============= OR SERVER - BY MR. SKILLFULL
=== === ==== === === ===
========= ============ ===== = =====
========= ========== ===== =====
@zfl9
zfl9 / ssredir_tproxy.sh
Created July 18, 2020 12:41
ss-redir pure tproxy transparent proxy
#!/bin/bash
start_ssredir() {
# please modify MyIP, MyPort, etc.
(ss-redir -s MyIP -p MyPort -m MyMethod -k MyPasswd -b 127.0.0.1 -l 60080 --no-delay -u -T -v </dev/null &>>/var/log/ss-redir.log &)
}
stop_ssredir() {
kill -9 $(pidof ss-redir) &>/dev/null
}
@crispyricepc
crispyricepc / install-instructions.md
Last active April 29, 2024 08:15
wlprop - An xprop clone for wlroots based compositors

Dependencies

Make sure you have installed the following commands:

  • swaymsg
  • jq
  • slurp
  • awk

Installation

import requests
import sys
import json
def waybackurls(host, with_subs):
if with_subs:
url = 'http://web.archive.org/cdx/search/cdx?url=*.%s/*&output=json&fl=original&collapse=urlkey' % host
else:
url = 'http://web.archive.org/cdx/search/cdx?url=%s/*&output=json&fl=original&collapse=urlkey' % host
@timhughes
timhughes / fastapi_websocket_redis_pubsub.py
Last active April 29, 2024 08:00
FastAPI Websocket Bidirectional Redis PubSub
"""
Usage:
Make sure that redis is running on localhost (or adjust the url)
Install uvicorn or some other asgi server https://asgi.readthedocs.io/en/latest/implementations.html
pip install -u uvicorn
Install dependencies
@ii64
ii64 / main.go
Created February 16, 2022 22:00
Go ebpf tracepoint example of kmem:mm_page_alloc , syscalls:sys_enter_open, and syscalls:sys_enter_openat
//go:build linux
// +build linux
// This program demonstrates attaching an eBPF program to a kernel tracepoint.
// The eBPF program will be attached to the page allocation tracepoint and
// prints out the number of times it has been reached. The tracepoint fields
// are printed into /sys/kernel/debug/tracing/trace_pipe.
package main
import (
@jerodg
jerodg / windows_and_office_kms_setup.adoc
Last active April 29, 2024 07:55
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

@karthikscale3
karthikscale3 / gist:45800fc88123566ea11c8e079ac5799f
Created April 28, 2024 04:41
DSPy Chain of Thought - Query transformation
import dspy
from dspy.teleprompt import BootstrapFewShot
class CoT(dspy.Module):
def __init__(self):
super().__init__()
self.prog = dspy.ChainOfThought("question -> answer")
def forward(self, question):
@StarBuckR
StarBuckR / main.go
Last active April 29, 2024 07:50
Golang Ldap Authentication, Bind and Search, including Anonymous Bind
package main
import (
"fmt"
"log"
"github.com/go-ldap/ldap/v3"
)
const (
@luncliff
luncliff / cmake-tutorial.md
Last active April 29, 2024 07:48
CMake 할때 쪼오오금 도움이 되는 문서

CMake를 왜 쓰는거죠?
좋은 툴은 Visual Studio 뿐입니다. 그 이외에는 전부 사도(邪道)입니다 사도! - 작성자

주의

  • 이 문서는 CMake를 주관적으로 서술합니다
  • 이 문서를 통해 CMake를 시작하기엔 적합하지 않습니다
    https://cgold.readthedocs.io/en/latest/ 3.1 챕터까지 따라해본 이후 기본사항들을 속성으로 익히는 것을 돕기위한 보조자료로써 작성되었습니다