This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tarfile | |
import os | |
import shutil | |
def is_symlink(path): | |
try: | |
os.readlink(path) | |
return True | |
except: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip install pywin32 | |
import ctypes | |
from ctypes import c_char | |
from win32process import GetWindowThreadProcessId | |
from win32gui import GetForegroundWindow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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__); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |