Skip to content

Instantly share code, notes, and snippets.

View yuchuanfeng's full-sized avatar
🌴
On vacation

chuanfeng yuchuanfeng

🌴
On vacation
View GitHub Profile
@yuchuanfeng
yuchuanfeng / Screenshot.swift
Created March 15, 2017 07:55 — forked from nitrag/Screenshot.swift
This will allow you to take a screenshot of a UIView, but more importantly only a section of that view
//
// Screenshot.swift
//
// 1) Take a picture of a UIView
// 2) Take a picture of a UIView's subframe. EG. Fullscreen UIView with a
// small square box in the middle, it will only save what's visible in the box frame
// but not the box itself
import Foundation
import UIKit
#!/bin/bash
#set -e
BUNDLEIDENTIFIER=come.tencent.xin
APPLICATIONIDENTIFIER=***.${BUNDLEIDENTIFIER}
ORIGINDIR=$(pwd)
FILEPATH=***/WeChat
TEMPDIR=$(mktemp -d)
ObjectPath=$BUILT_PRODUCTS_DIR
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
// if (self.isMovingToParentViewController == NO && !self.presentedViewController)
// {
// [self getInfos];
// }
UIViewController *fromViewController = [[[self navigationController] transitionCoordinator] viewControllerForKey:UITransitionContextFromViewControllerKey];
if (![[self.navigationController viewControllers] containsObject:fromViewController] && !self.presentedViewController)
{//Something is being popped and we are being revealed
'''
Break on Objective-C 's method using its address'
'''
import shlex
import lldb
import re
def breakonmethod(debugger, command, exe_ctx,result, internal_dict):
args=shlex.split(command)
Class=args[0]
Method=args[1]
#!/usr/bin/env bash
echo "Cleaning up..."
rm -rf bin/ src/
echo "Updating submodules..."
git submodule update --init --recursive
echo "Copying sources..."
mkdir src/
#! /usr/bin/env bash
echo "Starting...."
INPUT_FOLDER=$1
OUTPUT_FOLDER=$2
echo $INPUT_FOLDER
echo $OUTPUT_FOLDER
//
// LoginViewController.m
// IKEv2_Demo
//
// Created by zqqf16 on 16/3/16.
// Copyright © 2016年 zqqf16. All rights reserved.
//
#import <NetworkExtension/NEVPNManager.h>
#import <NetworkExtension/NEVPNConnection.h>
#! /usr/bin/env bash
echo "starting..."
contains() {
string="$1"
substring="$2"
if test "${string#*$substring}" != "$string"
then
return 0 # $substring is in $string
enum LivePlatform: Int, RawRepresentable {
case yingke = 1
case douyu
typealias RawValue = (name: String, color: UIColor)
var rawValue: RawValue {
switch self {
case .yingke:
return RawValue("映客", YZJColor_16(0x6ee6d3))
#import "ViewController.h"
#import <AFNetworking/AFNetworking.h>
@interface ViewController ()
@end
static dispatch_queue_t _queue;
@implementation ViewController