Skip to content

Instantly share code, notes, and snippets.

Avatar

laoyur laoyur

View GitHub Profile
@laoyur
laoyur / gist:5b9f906ad16ab399c30e1ce5f14cfcb7
Created Nov 25, 2018
code to fix Cydia network problem on iOS 11
View gist:5b9f906ad16ab399c30e1ce5f14cfcb7
//
// main.c
// NetworkFixer
//
// Created by mac on 2018/11/24.
// Copyright (c) 2018 ___ORGANIZATIONNAME___. All rights reserved.
//
#include <stdio.h>
#import <Foundation/Foundation.h>
View gist:08cf96cad3c76815224cfc203fd43bb3
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 Oct 23, 2019
hide keyboard on touching outside of EditText.
View BaseActivity.java
//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;
You can’t perform that action at this time.