Skip to content

Instantly share code, notes, and snippets.

View Kingson's full-sized avatar
🎯
Focusing

Kingson Zhou Kingson

🎯
Focusing
  • ButtonSoftware
  • China
View GitHub Profile
# pylint: skip-file
import time
import re
import md5
import requests
import json
INSTAGRAM_URL = "https://www.instagram.com"
HASHTAG_ENDPOINT = "/graphql/query/?query_hash={}&variables={}"
@deneschen
deneschen / windows CMD命令大全及详细解释和语法
Created February 26, 2018 14:33
windows CMD命令大全及详细解释和语法
windows CMD命令大全及详细解释和语法
引用:
http://letle.iteye.com/blog/169045
http://www.cppblog.com/kyelin/archive/2007/04/21/22540.aspx
windows批处理程序中的特殊字符
批处理介绍
纯以dos系统而言,可执行程序大约可以细分为五类,依照执行优先级由高到低排列分别是:
DOSKEY宏命令(预先驻留内存)
var CryptoJS = require('crypto-js')
var request = require('request-promise')
/*
* npm install crypto-js request-promise request
* node wx_t1t_hack.js
*/
// export function testEncription(msg, fullKey) {
// var fullKey = fullKey.slice(0, 16)
@rambolee
rambolee / how_to_fix_update_gwflist_404_error.md
Last active July 9, 2020 00:59
shadowSocks 从 gwflist更新 PAC 时404

shadowSocks 从 gwflist更新 PAC 时404

shadowSocks 从 gwflist更新 PAC 时404

问题:MacOS下ShadowsocksX点击“从GFWList更新PAC”报“Request failed : not found(404)”错误。 查看了 github 的 issue,发现是新问题,但是已经有大神解决了,解决方案如下。
下面是大神的 shell 代码,果断观摩之:

大神的 github 地址

@VincentSit
VincentSit / update_gfwlist.sh
Last active March 24, 2024 14:39
Automatically update the PAC for ShadowsocksX. Only tested on OS X. (Deprecated)
#!/bin/bash
# update_gfwlist.sh
# Author : VincentSit
# Copyright (c) http://xuexuefeng.com
#
# Example usage
#
# ./whatever-you-name-this.sh
#
# Task Scheduling (Optional)
@KittenYang
KittenYang / UIView+ExtendTouchRect.m
Created April 8, 2016 02:41
一行代码实现点击区域的扩大
void Swizzle(Class c, SEL orig, SEL new) {
Method origMethod = class_getInstanceMethod(c, orig);
Method newMethod = class_getInstanceMethod(c, new);
if (class_addMethod(c, orig, method_getImplementation(newMethod), method_getTypeEncoding(newMethod))){
class_replaceMethod(c, new, method_getImplementation(origMethod), method_getTypeEncoding(origMethod));
} else {
method_exchangeImplementations(origMethod, newMethod);
}
}
@KittenYang
KittenYang / UIGestureRecognizer+Block.m
Last active June 16, 2019 01:46
使用 Block 创建 UIGestureRecognizer
static const int target_key;
@implementation UIGestureRecognizer (Block)
+(instancetype)nvm_gestureRecognizerWithActionBlock:(NVMGestureBlock)block {
return [[self alloc]initWithActionBlock:block];
}
- (instancetype)initWithActionBlock:(NVMGestureBlock)block {
self = [self init];
[self addActionBlock:block];
@0xlitf
0xlitf / iOS jump URL
Created December 5, 2015 04:20
iOS跳到系统设置里的各种设置界面
NSURL *url = [NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"];
if ([[UIApplication sharedApplication] canOpenURL:url])
{
[[UIApplication sharedApplication] openURL:url];
}
About — prefs:root=General&path=About
Accessibility — prefs:root=General&path=ACCESSIBILITY
Airplane Mode On — prefs:root=AIRPLANE_MODE
@bang590
bang590 / linkmap.js
Last active August 19, 2023 15:24
XCode Linkmap Parser
var readline = require('readline'),
fs = require('fs');
var LinkMap = function(filePath) {
this.files = []
this.filePath = filePath
}
LinkMap.prototype = {
start: function(cb) {
@selfboot
selfboot / coursera_download.py
Created September 2, 2014 12:47
批量下载Coursera上面的课程资源。使用时,我们只需要运行程序,并把课程名称作为参数传递给程序就可以了(这里的课程名称并不是整个课程的完整名字,而是在课程介绍页面地址中的缩略名字,比如Computer Networks这门课,课程名称是comnetworks-002)。
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import requests
from bs4 import BeautifulSoup
import codecs
import string
import random
import re
import getpass