Skip to content

Instantly share code, notes, and snippets.

View luxinyan's full-sized avatar

Lu Xinyan luxinyan

  • Shanghai, China
View GitHub Profile
@luxinyan
luxinyan / jandan_spider.py
Created December 16, 2015 14:28
use BeautifulSoup to crow jandant
#!/usr/bin/python
#-*- coding: utf-8 -*-
#encoding=utf-8
import urllib
import urllib2
import os
import time
from BeautifulSoup import BeautifulSoup
[General]
loglevel = notify
[Proxy]
Proxy = shadowsocks, 1.2.3.4, 443, rc4-md5, password
[Rule]
DOMAIN-SUFFIX,appldnld.apple.com,DIRECT
DOMAIN-SUFFIX,adcdownload.apple.com,DIRECT
DOMAIN-SUFFIX,swcdn.apple.com,DIRECT
@luxinyan
luxinyan / FRP iOS Learning resources.md
Last active August 29, 2015 14:27 — forked from JaviLorbada/FRP iOS Learning resources.md
The best FRP in iOS links.

Videos

@luxinyan
luxinyan / app_store_app_data.json
Last active August 29, 2015 14:11 — forked from genadyo/gist:295a5e8f0d743f57137f
url scheme from twitter
{
"491289025" : "ijinshan-kappmarket://",
"301521403" : "fb103361823069955://",
"492178411" : "ils492178411://",
"346142396" : "fb234434003713://",
"310633997" : "whatsapp://",
"370614765" : "com.condenet.newyorker://",
"325058491" : "rnmddisco://",
"382952264" : "epichttp://",
"477048487" : "predictwind://",
import re
import urllib2
import urllib
import sys
import time
#get html of page
def getHtml(url):
page = urllib2.urlopen(url)
html = page.read()
@luxinyan
luxinyan / .gitignore
Last active August 29, 2015 14:05 — forked from MengTo/gist:11280811
Gitignore for Xcode/Cocoapods
# Created by http://www.gitignore.io
### Xcode ###
build
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcworkspace/contents.xcworkspacedata
### Objective-C ###
@luxinyan
luxinyan / build_number_equal_date
Created August 21, 2014 01:56
Let Xcode build number = date
buildNumber=$(date "+%y%m%d")
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"
@luxinyan
luxinyan / RNSwizzle.m
Created August 14, 2014 02:32
Method Swizzle
//
// RNSwizzle.m
// MethodSwizzle
#import "RNSwizzle.h"
#import <objc/runtime.h>
@implementation NSObject (RNSwizzle)
@luxinyan
luxinyan / Gesture.m
Last active August 29, 2015 14:05
use implement and use a gesture
- (void)setPannableView:(UIView *)pannableView // maybe this is a setter in a Controller
{
_pannableView = pannableView;
UIPanGestureRecognizer *pangr =
[[UIPanGestureRecognizer alloc] initWithTarget:pannableView action:@selector(pan:)];
[pannableView addGestureRecognizer:pangr];
}
//implement a gesture
@luxinyan
luxinyan / UIBezierPathDemo.m
Last active August 29, 2015 14:05
How to use UIBezierPath draw
//Begin the path
UIBezierPath *path = [[UIBezierPath alloc] init];
//Move around, add lines or arcs to the path
[path moveToPoint:CGPointMake(75, 10)];
[path addLineToPoint:CGPointMake(160, 150)];
[path addLineToPoint:CGPointMake(10, 150]);
//Close the path
[path closePath];