Skip to content

Instantly share code, notes, and snippets.

View jackyzonewen's full-sized avatar
👽
🖥 🏋🏼‍♀️ 🚴🏿‍♂️ 一天撸一斤代码

挡不住的君文 jackyzonewen

👽
🖥 🏋🏼‍♀️ 🚴🏿‍♂️ 一天撸一斤代码
  • 星网锐捷
  • 福州
View GitHub Profile
@jamztang
jamztang / UIView+JTRemoveAnimated.h
Created October 3, 2011 18:35
Adding fade out effect on -[UIView removeFromSuperview]
//
// UIView+JTRemoveAnimated.h
//
// Created by james on 9/1/11.
// http://ioscodesnippet.tumblr.com/
//
@interface UIView (JTRemoveAnimated)
- (void)removeFromSuperviewAnimated;
@supersha
supersha / publish.sh
Last active December 24, 2015 19:02
命令行直接发布当前的git分支到日常/线上
#! /bin/bash
gitStatus=`git status | grep -E 'On branch daily\/(\d+\.\d+\.\d+)'`
currentBranch=${gitStatus/On branch daily\//}
while getopts "v:m:o" arg
do
case $arg in
v)
#echo "v's arg:$OPTARG"
@azone
azone / open-in-blank.js
Created January 13, 2013 11:33
Open Octopress external link in new tab
function addBlankTargetForLinks () {
$('a[href^="http"]').each(function(){
$(this).attr('target', '_blank');
});
}
$(document).bind('DOMNodeInserted', function(event) {
addBlankTargetForLinks();
});
@jk2K
jk2K / appcrush.py
Created May 26, 2015 07:03
appcrush.rb的python版本
# coding=utf-8
import os
import sys
import glob
pngcrush = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/pngcrush"
destination = os.path.join(os.environ['HOME'], 'Desktop')
for ipa in sys.argv:
/*
* MethodSwizzle.h
*
* Copyright (c) 2007-2011 Kent Sutherland
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so,
@supersha
supersha / storage-usage.js
Last active January 3, 2019 04:06
支持localStorage设置过期时间功能的封装代码
// expires方法的参数是以秒为单位的,其他的方法跟localStorage的相同
// 方法有:getItem/setItem/removeItem/clear/expires
// 30秒后过期
storage.setItem("test","hello world").expires(30);
storage.setItem("test","hello world");
storage.expires(30);
// clear全部由storage创建的localStorage
@goshacmd
goshacmd / fix_sys_rb.sh
Created June 12, 2013 07:41
OS X [REDACTED] Ruby 2.0 headers fix.
sys_rb_usr=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr
sdk_rb_usr=`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr
sudo cp -r $sdk_rb_usr/include $sys_rb_usr/include
@raven
raven / Breakpoints_v2.xcbkptlist
Last active August 30, 2019 00:53
Symbolic breakpoint for dynamically linking libReveal against UIApplicationMain
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "2"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.SymbolicBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
@trawor
trawor / turbo-qiniu.sh
Last active March 8, 2021 03:21
本脚本解决部分地区七牛上传速度慢的问题
#!/bin/bash
#
# 通过对比 ping 响应时间,找到本机最快的上传ip
# Travis@fir.im
#
# 使用方法:
# sh -c "$(curl -sSL https://gist.githubusercontent.com/trawor/5dda140dee86836b8e60/raw/turbo-qiniu.sh)"
echo "# 这个脚本理论上可以帮你获取任意域名的最快速的IP"
echo "# 获取IP列表的服务由 17ce.com 提供, 非常感谢有这么好的免费服务!"
@jakebellacera
jakebellacera / how-to-install-memcache-on-mamp-2.md
Last active July 4, 2021 16:09
How To Install Memcache on MAMP 2

How To Install Memcache on MAMP 2

Note: This is an old guide and may not work for newer versions of macOS. Please see comments below for additional steps.

  1. Install memcached. I'd suggest using homebrew. brew install memcached
  2. Select your desired version of PHP that you'd like to use in MAMP. This dropdown is located in the PHP tab in MAMP PRO.
  3. Visit the Downloads Page on php.net and download the source code. If your release isn't listed, visit the Releases page.
  4. Extract the source into /Applications/MAMP/bin/php/[php version folder]/include/php.
  5. /Applications/MAMP/bin/php/[php version folder]/include/php/configure
  6. /Applications/MAMP/bin/php/[php version folder]/bin/pecl i memcache.