Skip to content

Instantly share code, notes, and snippets.

View Detavern's full-sized avatar
🎯
Focusing

wYw Detavern

🎯
Focusing
View GitHub Profile
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 30, 2025 02:57
set -e, -u, -o, -x pipefail explanation
@stroebs
stroebs / make-chr.sh
Last active January 19, 2025 10:59
Install Mikrotik CHR on a Digital Ocean droplet (Ubuntu 20.04 tested working 29/03/2022)
#!/bin/bash
#
# Digital Ocean Ubuntu 18.04 x64 Droplet with "Regular Intel" CPU.
# Running:
# git clone https://gist.github.com/54fc09734a3911e91eeeb43434f117df.git
# cd 54fc09734a3911e91eeeb43434f117df/
# chmod +x make-chr.sh
# ./make-chr.sh
#
# Once the reboot is done, login with root/CHANGEME and change the password!
@fire1ce
fire1ce / oh-my-zsh on openwrt or lede-project.md
Last active April 9, 2025 05:24
Install oh-my-zsh on openwrt/lede-project

Install oh-my-zsh on OpenWrt

Install Requirements Packages

opkg update && opkg install ca-certificates zsh curl git-http

Install oh-my-zsh

@Jamesits
Jamesits / vps2routeros.sh
Last active February 3, 2023 01:57
Convert your VPS to RouterOS - works on Ubuntu 16.04+. https://blog.swineson.me/install-routeros-on-any-ubuntu-vps/
#!/bin/bash
# This project has been moved to https://github.com/Jamesits/vps2routeros.
# This script is still kept for compatibility, but it will not be updated anymore.
echo "You are using an old version of vps2routeros. Please download the new version from https://github.com/Jamesits/vps2routeros ."
# VPS2RouterOS
#
# !!!!!!!!!PLEASE READ ALL THE FOLLOWING TEXT BEFORE RUNNING THIS!!!!!!!!!!!
@blackandred
blackandred / main.yml
Last active November 15, 2024 02:10
Ansible + Docker: Clean up unused, old containers and images to free up the disk space
#
# Created for free for the anarchist movement around the world.
# See iwa-ait.org, zsp.net.pl, wolnosciowiec.net
#
- name: Schedule a clean up for Docker images
become: yes
cron:
name: "docker-clean-up-images"
minute: "0"
@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active April 2, 2025 07:38
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@melvincabatuan
melvincabatuan / BOOSTwithPython3
Created April 5, 2015 10:47
Compile BOOST with Python3 support
1. Check Python3 root
>>> import sys
>>> import os
>>> sys.executable
'/usr/local/bin/python3'
OR
$ which python3
/usr/local/bin/python3
@klzgrad
klzgrad / 00-README.txt
Last active December 14, 2024 10:10
DNS compression pointer mutation
$ LD_PRELOAD=$PWD/sendmsg.so dig twitter.com @8.8.8.8
;; Warning: Message parser reports malformed message packet. <-- malformed 因为把压缩指针当作域名一部分了
;; Question section mismatch: got twitter.com/RESERVED0/CLASS256
; <<>> DiG 9.9.5-3-Ubuntu <<>> twitter.com @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44722
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
@nhoad
nhoad / gist:8966377
Last active March 2, 2023 09:30
Async stdio with asyncio
import os
import asyncio
import sys
from asyncio.streams import StreamWriter, FlowControlMixin
reader, writer = None, None
@asyncio.coroutine
def stdio(loop=None):
@evildmp
evildmp / gist:3094281
Last active June 30, 2023 10:55
Set up Django, nginx and uwsgi

This document has now been incorporated into the uWSGI documentation:

http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using: