Skip to content

Instantly share code, notes, and snippets.

jackyshan

Block or report user

Report or block jackyshan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jackyshan
jackyshan / copyimgstoimgs.sh
Created Feb 1, 2016
复制iOS图片到Android目录
View copyimgstoimgs.sh
#!/bin/bash
for i in `ls`
do
for imgname in `ls $i | grep '^WM.*'`
do
echo $imgname
cp $i/$imgname /Users/jackyshan/Desktop/Project/PregnantMotherAte/PregnantMotherAte_Android/app/src/main/res/mipmap-hdpi/recipes/$imgname
done
done
@jackyshan
jackyshan / icon_android.sh
Created Feb 1, 2016
图片切成Android比例
View icon_android.sh
#!/bin/sh
convert icon-1024.png -resize 48x48 mipmap-mdpi/ic_launcher.png
convert icon-1024.png -resize 72x72 mipmap-hdpi/ic_launcher.png
convert icon-1024.png -resize 96x96 mipmap-xhdpi/ic_launcher.png
convert icon-1024.png -resize 144x144 mipmap-xxhdpi/ic_launcher.png
convert icon-1024.png -resize 192x192 mipmap-xxxhdpi/ic_launcher.png
View goldreminder.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re, urllib2, threading, os
resp = urllib2.urlopen('https://goldetfprod.alipay.com/gold/queryChart.htm?productCode=000930')
respread = resp.read();
pattern = re.compile(r'\[{"fundGoldPrice":\d+\.\d+');
@jackyshan
jackyshan / modkeyboard.py
Created Mar 24, 2016
模拟键盘输入
View modkeyboard.py
import os
import time
import thread
from datetime import datetime
cmd = """
osascript -e 'tell application "System Events" to keystroke " "'
"""
def pressSpace(sign, sign1):
i = 0
@jackyshan
jackyshan / SayWeather.py
Created Feb 22, 2016
起床闹钟天气小程序
View SayWeather.py
# -*- coding: utf-8 -*-
import os
import urllib2
import json
import time
from BaiduTrans import translate
while True:
@jackyshan
jackyshan / blurImage.m
Created Aug 7, 2016
图片模糊效果
View blurImage.m
-(UIImage *)boxblurImageWithBlur:(CGFloat)blur {
NSData *imageData = UIImageJPEGRepresentation(self, 1); // convert to jpeg
UIImage* destImage = [UIImage imageWithData:imageData];
if (blur < 0.f || blur > 1.f) {
blur = 0.5f;
}
int boxSize = (int)(blur * 40);
@jackyshan
jackyshan / expandZoom.m
Created Aug 7, 2016
scrollview滑动图片拉伸
View expandZoom.m
#import "ViewController.h"
static CGFloat kImageOriginHight = 240.f;
@interface ViewController ()
@property (strong, nonatomic) IBOutlet UIImageView *expandZoomImageView;
@end
@jackyshan
jackyshan / lineViewScroll.m
Last active Aug 7, 2016
下划线随着scrollview滑动
View lineViewScroll.m
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
if (scrollView.tag == 318) {
self.currentPage = (NSInteger)((scrollView.contentOffset.x + FUll_VIEW_WIDTH / 2) / FUll_VIEW_WIDTH);
}
}
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
if (scrollView.tag == 318) {
NSInteger yourPage = (NSInteger)((scrollView.contentOffset.x + FUll_VIEW_WIDTH / 2) / FUll_VIEW_WIDTH);
CGFloat additionCount = 0;
@jackyshan
jackyshan / keep_moviePlayer.m
Created Aug 14, 2016
keep首页视频动画
View keep_moviePlayer.m
#import "ViewController.h"
#import <MediaPlayer/MediaPlayer.h>
#import <AVFoundation/AVFoundation.h>
@interface ViewController ()
@property(nonatomic,strong)MPMoviePlayerController *moviePlayer;
@property(nonatomic ,strong)NSTimer *timer;
@property (weak, nonatomic) IBOutlet UIView *alpaView;
@property (weak, nonatomic) IBOutlet UIButton *regiset;
@property (weak, nonatomic) IBOutlet UIButton *login;
View JKJSPatchHelper.h
//
// JKJSPatchHelper.h
// YangTao
//
// Created by jackyshan on 16/10/11.
// Copyright © 2016年 linkcool. All rights reserved.
//
#import <Foundation/Foundation.h>
You can’t perform that action at this time.