Skip to content

Instantly share code, notes, and snippets.

@zhouyuan24
zhouyuan24 / LinkedTextView.h
Created November 5, 2015 01:57 — forked from benjaminbojko/LinkedTextView.h
UITextView Subclass to avoid Long-Press Delays with embedded Links
//
// LinkedTextView.h
//
// Created by Benjamin Bojko on 10/22/14.
//
// The MIT License (MIT)
//
// Copyright (c) 2014 Benjamin Bojko
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
@zhouyuan24
zhouyuan24 / php截取最后一个字符串
Created March 10, 2014 08:20
php截取最后一个字符串
$str = "1,2,3,4,5,6,";
$newstr = substr($str,0,strlen($str)-1);
echo $newstr;
var githubList = [
{
name:'系统基础库',
list: [
{name:'Category/Util',
list: [
{name:'sstoolkit', owner:'soffes', desc:'一套Category类型的库,附带很多自定义控件 功能不错~'},
{name:'BlocksKit', owner:'pandamonia', desc:'将Block风格带入UIKit和Founcation'},
{name:'cocoa-helpers', owner:'enormego', desc:'一些Cocoa的扩展 2年前的工程'},
$(".fd-hover-show").hide();
$('.module-roles-tr').mousemove(function(e) {
$(this).find(".fd-hover-show").show();
}).mouseout(function() {
$(this).find(".fd-hover-show").hide();
});
@zhouyuan24
zhouyuan24 / UIAlertView
Created February 28, 2014 05:24
提示框弹出 object-c
UIAlertView *tips=[[UIAlertView alloc] initWithTitle:nil message:@"未找到图片" delegate:self cancelButtonTitle:@"确定" otherButtonTitles:nil ];
[tips show];
@zhouyuan24
zhouyuan24 / nginx-动态生成略缩图配置文件
Created February 28, 2014 00:44
nginx动态生成略缩图
location /resize {
alias /tmp/nginx/resize;
set $width 150;
set $height 100;
set $dimens "";
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) {
set $width $1;
set $height $2;
set $image_path $3;
#!/bin/bash
confirm() {
echo "Press RETURN to continue, or ^C to cancel.";
read -e ignored
}
RHEL_VER_FILE="/etc/redhat-release"
if [[ ! -f $RHEL_VER_FILE ]]