Skip to content

Instantly share code, notes, and snippets.

View mzlogin's full-sized avatar

Zhuang Ma mzlogin

View GitHub Profile
@mzlogin
mzlogin / GetImageSize.java
Last active July 18, 2016 09:35
Get image size without load image to memory in Android.
BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inJustDecodeBounds = true;
BitmapFactory.decodeResource(context.getResources(), R.drawable.demo_img, opt);
int width = opt.outWidth;
int height = opt.outHeight;
@mzlogin
mzlogin / eclipse_prederences.epf
Last active August 29, 2015 14:10
Eclipse preferences for android developing
#Wed Jan 07 10:16:38 GMT+08:00 2015
file_export_version=3.0
@org.eclipse.ui.workbench=3.104.0.v20130204-164612
/instance/org.eclipse.ui.workbench/org.eclipse.ui.commands=<?xml version\="1.0" encoding\="UTF-8"?>\r\n<org.eclipse.ui.commands>\r\n<keyBinding commandId\="org.eclipse.ui.edit.text.goto.columnPrevious" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="ALT+H"/>\r\n<keyBinding commandId\="org.eclipse.ui.edit.text.goto.columnNext" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="ALT+L"/>\r\n<keyBinding commandId\="org.eclipse.ui.edit.text.goto.lineDown" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConfiguration" keySequence\="ALT+J"/>\r\n<keyBinding commandId\="org.eclipse.ui.edit.text.goto.lineUp" contextId\="org.eclipse.ui.contexts.window" keyConfigurationId\="org.eclipse.ui.defaultAcceleratorConf
@mzlogin
mzlogin / CsdnCommenter.py
Last active December 5, 2020 15:08
自动打分评论指定CSDN账号内所有下载过待评论的资源。
# File : csdncommenter.py
# Author : Zhuang Ma
# E-mail : chumpma(at)gmail.com
# Website: http://mazhuang.org
# Date : 2016-07-26
import requests
from BeautifulSoup import BeautifulSoup
import getpass
import time
import random
@mzlogin
mzlogin / CustomRules.js
Last active October 6, 2021 21:02
Fiddler Custom Rules With Some Addition Feature
import System;
import System.Windows.Forms;
import Fiddler;
// INTRODUCTION
// This is the FiddlerScript Rules file, which creates some of the menu commands and
// other features of Fiddler. You can edit this file to modify or add new commands.
//
// The original version of this file is named SampleRules.js and it is in the
// \Program Files\Fiddler\ folder. When Fiddler first starts, it creates a copy named
if __name__ == '__main__':
print 'Hello, World!'