Skip to content

Instantly share code, notes, and snippets.

View flyfire's full-sized avatar
🎯
Focusing

flyfire flyfire

🎯
Focusing
View GitHub Profile
PS1='`a=$?;if [ $a -ne 0 ]; then a=" "$a; echo -ne "\[\e[s\e[1A\e[$((COLUMNS- 2))G\e[31m\e[1;41m${a:(-3)}\e[u\]\[\e[0m\e[7m\e[2m\]"; fi`\[\e[1;32m\]\u@\h:\[\e[0m\e[1; 34m\]\W\[\e[1;34m\]\$ \[\e[0m\]'
PS2='⌘ >>'
@flyfire
flyfire / vim-note.md
Last active December 21, 2015 00:19
vim-user-manual-notes

Vim User Manual

##VIM第一步

  • U一次撤销一行的全部操作。第二次使用该命令会撤销前一个U的操作。
  • uCTRL_R撤销和重做
  • ctrl_]跳转到一个标签,ctrl_t弹出标签可以回到前一个位置,ctrl_o跳转到较早的位置。
  • help
    • help {subject}
    • help ctrl-a help i_ctrl-a
    • help -t命令行选项
  • help i_
@flyfire
flyfire / vimrc
Last active December 21, 2015 01:19
vimrc,gvimrc
"http://anduo.iteye.com/blog/1867212
"http://lok.me/a/1337.html
"http://www.pythonclub.org/vim/gui-font
"http://www.oschina.net/code/snippet_574132_13357
"vim gvim windows 字体设置 github
"https://github.com/ruchee/vim
"https://github.com/hooluupog/TestLanguagePerformance/tree/master/vim
# Vim User Manual
##VIM第一步
@flyfire
flyfire / import-to-firewall.vbs
Created August 19, 2013 07:48
import-to-firewall
'########################################################################
' netsh advfirewall firewall - Details on the command here: http://technet.microsoft.com/en-us/library/dd734783(WS.10).aspx
' To be run on Windows Vista/7/Server 2008/2008R2 only
' IP data supplied by ipdeny.com
'########################################################################
Dim objShell
set objShell=CreateObject("Wscript.shell")
'########################################################################
@flyfire
flyfire / solarex-markdown.css
Created September 10, 2013 03:49
markdown-css
@charset "utf-8";
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
body{
color:#444;
font-family:Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman', serif;
font-size:13px;
line-height:1.5em;
padding:1em;
@flyfire
flyfire / android-command.markdown
Last active December 22, 2015 17:28
android commandline

Android Commandline

#Android Commandline

##创建avd

  • android list target
  • android create avd -n avd10 -t 1,If the target you selected was a standard Android system image ("Type: platform"), the android tool next asks you whether you want to create a custom hardware profile.在hardware emulation settings中设置hw.ramSize
  • android delete avd -n avd10
  • syntax hightlight

#Java Review

##Ubuntu安装JDK

  • sudo mkdir /usr/lib/jvm/jdk_1.6.0.26
  • sudo ./jdk_1.6.0.26.bin
  • 告诉系统有一个新安装的Java版本
    • sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk_1.6.0.26/bin/java" 1
  • 将新安装的Java版本设置为默认的
    • sudo update-alternatives --set java /usr/lib/jvm/jdk_1.6.0.26/bin/java
import java.util.*;
class HashSetTest
{
public static void main(String[] args)
{
HashSet hs = new HashSet();
System.out.println(hs.add(new People("zhangshan")));
System.out.println(hs.add(new People("lishi")));
System.out.println(hs.add(new People("zhangshan")));

#objective-c基础教程


框架是一种聚集在一个单元的部件集合,包含头文件、库、图像、声音文件等。苹果公司将Cocoa、Carbon、QuickTime、OpenGL等技术作为框架集提供。Cocoa的组成部分有Foundation和Application Kit框架。还有一个支持框架的套件,包含Core Animation和Core Image。

Foundation框架头文件目录:/System/Library/Frameworks/Foundation.framework/Headers

NSSpeech-Synthesizer使你听到语音。

#Cocoa.Programming.for.Mac.OS.X

  • The @ symbol is not used in the C programming language. To minimize conflicts between C code and Objective-C code, Objective-C keywords are prefixed by @. Here are a few other Objective-C keywords: @end, @implementation, @class, @selector, @protocol, @property, and @synthesize.

  • When the process is started, it runs the NSApplicationMain function, which creates an instance of NSApplication. The application object reads the main NIB file and unarchives the objects inside. The objects are all sent the message awakeFromNib. Then the application object checks for events. When it receives an event from the keyboard mouse, the window server puts the event data into the event queue for the appropriate application.The application object reads the event data from its queue and forwards it to a user interface object, such as a button, and your code gets triggered. If your code changes the data in a view, the view is redisplayed. Then th