Skip to content

Instantly share code, notes, and snippets.

gpu_freq=500
over_voltage=2
sdram_freq=580
over_voltage_sdram=5
sdram_schmoo=0x02000020
dtparam=sd_overclock=100
@interface NSString (TDF)
- (NSUInteger)tdf_chineseLength;
@end
@agassiyzh
agassiyzh / auto scale image
Last active August 29, 2015 14:19
Auto scale image for iOS develop folder action
property done_foldername : "Processed Images"
property original_foldername : "Original Images"
property error_foldername : "Error Images"
property error_list : {}
property type_list : {"JPEG", "TIFF", "GIFf", "PICT", "8BIM", "PNGf"}
property extension_list : {"jpg", "jpeg", "tif", "tiff", "gif", "pct", "pict", "psd", "png"}
<!doctype html>
<html>
<head>
</head>
<body style="width: 320px">
<script>
window.onerror = function(err) {
}
@agassiyzh
agassiyzh / HD Video URLs
Created June 9, 2014 05:29
#WWDC14 HD Videos & PDFs URLs
http://devstreaming.apple.com/videos/wwdc/2014/101xx36lr6smzjo/101/101_hd.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/102xxw2o82y78a4/102/102_hd_platforms_state_of_the_union.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/103xx8s53gk94hl/103/103_hd_apple_design_awards.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/201xx2xfazhzce8/201/201_hd_advanced_topics_in_internationalization.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/202xx3ane09vxdz/202/202_hd_whats_new_in_cocoa_touch.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/203xxh9oqtm0piw/203/203_hd_introducing_healthkit.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/204xxhe1lli87dm/204/204_hd_whats_new_in_cocoa.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/205xxqzduadzo14/205/205_hd_creating_extensions_for_ios_and_os_x,_part_1.mov?dl=1
http://devstreaming.apple.com/videos/wwdc/2014/206xxdiurnffagr/206/206_hd_introducing_the_modern_webkit_api.mov?dl=1
set sh=/bin/bash
if has('vim_starting')
set nocompatible
set runtimepath+=~/.vim/bundle/vundle/
endif
call vundle#rc(expand('~/.vim/bundle/'))
Bundle 'gmarik/vundle'
@agassiyzh
agassiyzh / payment.py
Created November 28, 2013 12:52
#这个题目是这样的: #add_monthly_interest这个函数用来计算你每个月需要为你欠的欠付的利息 #make_payment 这个函数有两个参数 #第一个参数(payment)是你付掉的钱 #第二个参数(balance)是你一共需要付的钱,或这说是你欠的账单。 #所以make_payment这个函数的作用是用来计算你付了一部分账单,一个月以后需要付多少钱。 #所以根据题意,你第一次支付了账单的二分之一。那么你剩下来的欠款在一个月以后需要支付就是x = make_payment(bill / 2, bill) #这个时候你欠的钱就是x,然后付掉100就是:make_payment(100, x) #----Agassi^_^
#这个题目是这样的:
#add_monthly_interest这个函数用来计算你每个月需要为你欠的欠付的利息
#make_payment 这个函数有两个参数
#第一个参数(payment)是你付掉的钱
#第二个参数(balance)是你一共需要付的钱,或这说是你欠的账单。
#所以make_payment这个函数的作用是用来计算你付了一部分账单,一个月以后需要付多少钱。
#所以根据题意,你第一次支付了账单的二分之一。那么你剩下来的欠款在一个月以后需要支付就是x = make_payment(bill / 2, bill)
#这个时候你欠的钱就是x,然后付掉100就是:make_payment(100, x)
@agassiyzh
agassiyzh / gist:7653124
Created November 26, 2013 03:38
my vim config
set sh=/bin/bash
if has('vim_starting')
set nocompatible " Be iMproved
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#rc(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
@agassiyzh
agassiyzh / auto_rename.sh
Last active December 23, 2015 23:59
Put transmission torrent to current place
#!/bin/bash
HOST=localhost
PORT=9091
RPC_AUTH=0
USER=username
PASS=password
############################################################################
#! /bin/sh
### BEGIN INIT INFO
# Provides: transmission-daemon
# Required-Start: networking
# Required-Stop: networking
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: Start the transmission BitTorrent daemon client.
### END INIT INFO