Skip to content

Instantly share code, notes, and snippets.

@motorailgun
motorailgun / idea.md
Last active November 16, 2023 03:13
Installing Windows and Linux into the same partition

Installing Windows and Linux into the same partition

But WHY?

There was a reddit post about installing Arch on NTFS3 partition. Since Windows and Linux doesn't have directories with same names under the /(C:\), I thought it's possible, and turned out it was actually possible.
If you are not familiar to Linux, for example you've searched on Google "how to dualboot Linux and Windos" or brbrbr... you mustn't try this. This is not practical.

Pre-requirements

  • UEFI system
  • Any Linux live-boot CD/DVD/USB... with Linux kernel newer than 5.15
  • Windows installer USB
@lilydjwg
lilydjwg / btrfs-autosnapshot
Last active April 30, 2024 14:19
btrfs-autosnapshot
#!/usr/bin/python3
import os
import datetime
import subprocess
import logging
import tempfile
import contextlib
import ctypes
from pathlib import Path
@yjfvictor
yjfvictor / daemon_utility.c
Created December 12, 2018 17:37
A tool to start a process in daemon mode
/**
* @file daemon_utility.c
* @brief A tool to start a process in daemon mode
* @author yjf_victor
* @version 1.0
* @date 2018-12-13
* @copyright CC0 1.0 Universal https://creativecommons.org/publicdomain/zero/1.0/
*/
#include <stdio.h>
@nasyxx
nasyxx / ipython_config.py
Last active April 21, 2017 09:00
My ipython config
# Configuration file for ipython.
#------------------------------------------------------------------------------
# InteractiveShellApp(Configurable) configuration
#------------------------------------------------------------------------------
# A Mixin for applications that start InteractiveShell instances.
#
# Provides configurables for loading extensions and executing files as part of
# configuring a Shell environment.
@fffonion
fffonion / cf-ddns.sh
Last active July 4, 2018 10:04
Dynamic DNS script using Cloudflare API v4
#!/bin/bash
# can be A or AAAA
do_record=AAAA
# the interface to get ipv6 address
iface=eth0
# the static suffix we should add to
v6_suf=53
mail="me@email.com"
@lilydjwg
lilydjwg / mynetns_run
Created May 13, 2016 14:27
mynetns_run: Run a program in a seperate network namespace
#!/bin/bash -e
NETNS_FILE=/var/run/netns/mynet
MNTNS_FILE=/var/run/ns/mynet_mnt
if [[ ! -f $NETNS_FILE ]]; then
ip netns add mynet
ip link add mynet0 type veth peer name mynet1
ip link set mynet0 up

@nishuodedui 使用帮助

tl;dr

  • 锁推用户DM消息 fo 可被bot关注
  • 不需要关注bot,直接at即可

详细帮助

  • 不需要关注本帐号,但锁推用户需要给bot查看推文的权限.
@linusyang
linusyang / libom-patch.py
Created November 17, 2013 17:41
New WebKit-based Opera Mobile Off-Road Proxy Modifier
#!/usr/bin/env python
#-*- encoding: utf-8 -*-
#
# Opera Mobile Off-Road Proxy Modifier
# By Linus Yang <laokongzi@gmail.com>
# Licensed under GPLv3
#
from optparse import OptionParser
from zipfile import ZipFile, ZipInfo, ZIP_DEFLATED
@bert
bert / README
Created May 20, 2010 20:07
X11/Motif based text file viewer
The following command should build the application on most linux systems:
gcc -o xtxtvw xtxtvw.c -I/usr/X11R6/include -L/usr/X11R6/lib -lXm -lXt -lX11
The following command should build the application on many Solaris systems:
gcc -o xtxtvw xtxtvw.c -I/usr/dt/include -L/usr/openwin/lib -lXm -lXt -lX11
# EOF #