h1. Sublime Text 2 - Useful Shortcuts (Mac OS X)
h2. General
| ⌘T | go to file | | ⌘⌃P | go to project | | ⌘R | go to methods | | ⌃G | go to line | | ⌘KB | toggle side bar | | ⌘⇧P | command prompt |
#!/bin/bash | |
function check_install { | |
if [ -z "`which "$1" 2>/dev/null`" ] | |
then | |
executable=$1 | |
shift | |
while [ -n "$1" ] | |
do | |
DEBIAN_FRONTEND=noninteractive apt-get -q -y install "$1" |
#!/bin/bash | |
# Interactive PoPToP install script on a OpenVZ VPS | |
# Tested on Debian 5, 6, and Ubuntu 11.04 | |
# 2011 v1.1 | |
# Author: Commander Waffles | |
# http://www.putdispenserhere.com/pptp-debian-ubuntu-openvz-setup-script/ | |
echo "######################################################" | |
echo "Interactive PoPToP Install Script for OpenVZ VPS" | |
echo "by Commander Waffles http://www.putdispenserhere.com" |
h1. Sublime Text 2 - Useful Shortcuts (Mac OS X)
h2. General
| ⌘T | go to file | | ⌘⌃P | go to project | | ⌘R | go to methods | | ⌃G | go to line | | ⌘KB | toggle side bar | | ⌘⇧P | command prompt |
打开/前往 | |
⌘T 前往文件 | |
⌘⌃P 前往项目 | |
⌘R 前往 method | |
⌘⇧P 命令提示 | |
⌃G 前往行 | |
⌘KB 开关侧栏 | |
⌃ ` python 控制台 | |
⌘⇧N 新建窗口 |
#import <UIKit/UIKit.h> | |
#import <ImageIO/ImageIO.h> | |
#import <MobileCoreServices/MobileCoreServices.h> | |
- (void)exportAnimatedGif | |
{ | |
UIImage *shacho = [UIImage imageNamed:@"shacho.png"]; | |
UIImage *bucho = [UIImage imageNamed:@"bucho.jpeg"]; | |
NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"animated.gif"]; |
#!/bin/bash | |
## | |
# start|stop|restart python SimpleHTTPServer | |
# | |
# TODO: | |
# use shell Function for DRY | |
# USAGE: | |
# ./manage_simplehttpserver.sh start|stop|restart | |
# |