Skip to content

Instantly share code, notes, and snippets.

@shiweifu
shiweifu / podspec
Created January 7, 2014 13:16
podspec
Pod::Spec.new do |s|
s.name = "xxxxxxx"
s.version = "0.0.1"
s.summary = "A short description of xxxxxxxx."
s.homepage = "xxxxxx"
s.license = 'MIT'
s.author = { "shiweifu" => "[email protected]" }
s.platform = :ios, '7.0'
s.source = { :git => "[email protected]:weifu/iOS/xxxxxx.git", :tag => "0.1" }
@shiweifu
shiweifu / cut.py
Last active January 2, 2016 11:19
使用convert 裁剪图片,支持批量处理
import sh
import sys
cfgfile = sys.argv[-1]
for line in open(cfgfile):
line = line.strip()
split_line = line.split(',')
print(split_line)
@shiweifu
shiweifu / LocationTableViewController.m
Created January 2, 2014 11:53
get all cells in UITableView
//get all UITableViewCell
-(NSArray *)cellsForTableView
{
UITableView *tableView = self.tableView;
NSInteger sections = tableView.numberOfSections;
NSMutableArray *cells = [[NSMutableArray alloc] init];
for (int section = 0; section < sections; section++) {
NSInteger rows = [tableView numberOfRowsInSection:section];
for (int row = 0; row < rows; row++) {
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:section];
  • 都是片纸不少,耳机数据线什么的都在,
  • 都是11月初激活的。
  • 5s成色略差,5c成色冲新
  • 价格
    • 5s:4100
    • 5c:3100
  • 联系:
  • 用户名+gmail

GRD 4

###介绍:

箱说全国行,4块电池(记得是四块,最少能找到三块),原装充电器不见了,有一个我自己买的

###问题: 闪光灯坏了貌似是自杀,其他一切正常

@shiweifu
shiweifu / gist:5669928
Created May 29, 2013 12:30
注册并显示gravatar 头像
#coding: utf-8
#author: shiweifu
import web
from web import form
import urllib, hashlib
#template
@shiweifu
shiweifu / split_page.js
Created April 28, 2013 01:52
split_page
var mySheet = document.styleSheets[0];
function addCSSRule(selector, newRule) {if (mySheet.addRule) {mySheet.addRule(selector, newRule);} else {ruleIndex = mySheet.cssRules.length;mySheet.insertRule(selector + '{' + newRule + ';}', ruleIndex);}}
addCSSRule('html', 'padding: 10px; height: 528.000000px; -webkit-column-gap: 20px; -webkit-column-width: 300.000000px;')
addCSSRule('p', 'text-align: justify;')
addCSSRule('body', '-webkit-text-size-adjust: 100%;')
@shiweifu
shiweifu / login_shanbay.py
Created April 24, 2013 08:52
login_shanbay
import urllib2
import urllib
import re
from time import sleep
from cookielib import CookieJar
r = "name='csrfmiddlewaretoken'\svalue='(.+)'\s/"
r_compile = re.compile(r)
<div class="container">
<div class="row">
<div class="span5" style="margin-left: 300px;">
<section id="login-form" class="box">
<form action="/login" method="post">