Skip to content

Instantly share code, notes, and snippets.

@laoyur
laoyur / gist:5b9f906ad16ab399c30e1ce5f14cfcb7
Created November 25, 2018 09:01
code to fix Cydia network problem on iOS 11
//
// main.c
// NetworkFixer
//
// Created by mac on 2018/11/24.
// Copyright (c) 2018 ___ORGANIZATIONNAME___. All rights reserved.
//
#include <stdio.h>
#import <Foundation/Foundation.h>
import hashlib
import datetime
def next_wechat_substr(current):
for c in chrs:
yield current + c
def md5(s):
return hashlib.md5(s).hexdigest()
@laoyur
laoyur / BaseActivity.java
Last active October 23, 2019 13:40
hide keyboard on touching outside of EditText.
//author: laoyur
//inspired of http://stackoverflow.com/a/31021154
package com.laoyur.test;
import java.util.List;
import android.app.Activity;
import android.content.Context;
import android.graphics.Rect;
import android.os.Bundle;
import android.view.MotionEvent;
import android.view.View;