Skip to content

Instantly share code, notes, and snippets.

@404neko
404neko / gist:08d815711ddca6efa776b7413367ae6c
Created February 15, 2024 12:33
extract_tar_replace_symlinks.py
import tarfile
import os
import shutil
def is_symlink(path):
try:
os.readlink(path)
return True
except:
# pip install pywin32
import ctypes
from ctypes import c_char
from win32process import GetWindowThreadProcessId
from win32gui import GetForegroundWindow
// cmdmp3win
// A command-line MP3 player for Windows
// (window-mode version)
//
// License: MIT / X11
// Copyright (c) 2009, 2015 by James K. Lawless
// jimbo@radiks.net http://jiml.us
// See http://www.mailsend-online.com/license2015.php
//
// To build, use the following MinGW command:
@404neko
404neko / debug_output_macro.c
Created October 18, 2019 06:47
useful debug output macro
#include <stdio.h>
#ifndef _DEBUG
#define LOGFUNC(...) ((void)0)
#else
#define LOGFUNC(...) (printf(__VA_ARGS__))
#endif
#define dprint(...) printf("%-16s # %-3d :: %s() -> %s", __FILE__, __LINE__ , __FUNCTION__, ##__VA_ARGS__);
//use "gcc mon.c -lgdi32 -lIphlpapi -lws2_32 -o mon.exe"
#include <stdio.h>
#include <math.h>
#include <process.h>
#include <winsock2.h>
#include <iphlpapi.h>
#include <icmpapi.h>
#include <stdio.h>
#include <windows.h>
import requests
from bs4 import BeautifulSoup
import json
Header={"Origin":"https://instagram.com"
,"Accept-Encoding":"gzip, deflate"
,"X-Instagram-AJAX":"1"
,"User-Agent":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36"
,"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"
,"Accept-Language":"en,zh-CN;q=0.8,zh;q=0.6"