Skip to content

Instantly share code, notes, and snippets.

View tutumagi's full-sized avatar
🐢

tutu tutumagi

🐢
View GitHub Profile
@tutumagi
tutumagi / sipsimage.sh
Last active March 12, 2018 08:43
[修改图片分辨率]scale_jpg #osx
sips -Z 180 meika_person_1024.jpg --out meika_person_180.jpg
@tutumagi
tutumagi / Array+Split.swift
Last active March 12, 2018 08:46
[ArraySection] Split Array Section by Year/Month/Day
import Foundation
protocol DateElement {
var dateKey: Date {get set}
}
protocol DateSection : DateElement {
associatedtype Element: DateElement, Equatable
var elements: [Element] {get set}
}
@tutumagi
tutumagi / DYBasePageViewModel.h
Last active March 12, 2018 08:37
[Pagination ViewModel by ReactiveObjC] 分页请求的ReactiveObjc实现,下拉reload,上拉下一页,只需要根据`pageNumber`,`perPage`实现`loadPageData`, 依赖`MJRefresh` `ReactiveObjC`
#import <Foundation/Foundation.h>
typedef NS_OPTIONS(NSUInteger, PageVMConfigOption) {
PageVMConfigOptionRefresh = 0x01,
PageVMConfigOptionReload = 0x02,
PageVMConfigOptionDefault = PageVMConfigOptionRefresh | PageVMConfigOptionReload,
PageVMConfigOptionAll = PageVMConfigOptionDefault
};
/**
@tutumagi
tutumagi / awesome.sh
Created March 12, 2018 08:50
[git command] #git
# 将本地所有改动都清理掉,同步到git上HEAD版本
git checkout && git clean -df && git reset --hard
@tutumagi
tutumagi / script.sh
Created March 15, 2018 08:24
[Swift Project Open Comment Warning] Project Setting -> Build Phase -> Click + -> add Run Script
# Debug 编译下,开启 //TODO: //FIXME: 警告
if [ "${CONFIGURATION}" = "Debug" ]; then
TAGS="TODO:|FIXME:"
echo "searching ${SRCROOT} for ${TAGS}"
find "${SRCROOT}" \( -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/"
fi
@tutumagi
tutumagi / text.md
Last active March 23, 2018 03:20
[fastlane有莫名其妙的问题时]

Alright, I managed to reproduce this issue by using rvm and installing fastlane with

gem install fastlane

and also

rvm @global do gem install fastlane

Afterwards running rvm @global do fastlane action gym would throw the same error you posted. I fixed it by uninstalling fastlane completely:

//
// FMBlurable.swift
// FMBlurable
//
// Created by SIMON_NON_ADMIN on 18/09/2015.
// Copyright © 2015 Simon Gladman. All rights reserved.
//
// Thanks to romainmenke (https://twitter.com/romainmenke) for hint on a larger sample...
import UIKit
@tutumagi
tutumagi / demo.sh
Last active March 29, 2018 06:14
[git config proxy]
# 配置git代理
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
@tutumagi
tutumagi / demo.md
Created March 29, 2018 02:56
[vim操作]

Vim 快捷键

  • shift + g (跳转到文件末尾)
  • 在命令行窗口按 o(在光标下一行插入新行)
@tutumagi
tutumagi / unwxapkg.py
Created October 18, 2018 10:46 — forked from feix/unwxapkg.py
#!/usr/bin/env python2
# lrdcq
# usage python2 unwxapkg.py filename
import sys, os
import struct
class WxapkgFile(object):
nameLen = 0