Skip to content

Instantly share code, notes, and snippets.

View v5tech's full-sized avatar
🎯
Focusing

v5tech

🎯
Focusing
  • Xi'an China
  • 10:24 (UTC +08:00)
View GitHub Profile
@v5tech
v5tech / jenv.md
Created September 15, 2014 03:43
Mac下同时安装多个版本的JDK

Mac下同时安装多个版本的JDK

Mac自带了的JDK6,安装在目录:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/下。

JDK7,JDK8则需要自己到Oracle官网下载安装对应的版本。自己安装的JDK默认路径为:/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk

1. 在用户目录下的bash配置文件.bashrc中配置JAVA_HOME的路径:

export JAVA_6_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
@v5tech
v5tech / person.h
Last active August 29, 2015 14:06
iOS: The singleton pattern
#import <Foundation/Foundation.h>
@interface Person : NSObject
+ (id)sharedInstance;
@end
@v5tech
v5tech / Git.md
Created September 12, 2014 02:59
Git for windows 中文乱码解决方案
@v5tech
v5tech / cdn.md
Created September 2, 2014 07:29
常用的 JavaScript 库 CDN 加速服务
@v5tech
v5tech / gitconfig.md
Created September 1, 2014 15:59
Colorize Git Terminal Commands

Colorize Git Terminal Commands

Add the following to your ~/.gitconfig file to show the git command output in color when working in a terminal

[color]
  ui = auto
[color "branch"]
  current = yellow reverse
 local = yellow
@v5tech
v5tech / notes.md
Created August 29, 2014 09:16
iphone app promoting picture
@v5tech
v5tech / Gist.md
Last active August 29, 2015 14:05
在Github Pages页面里嵌入Gist

在Markdown格式的文章中合适的地方插入如下代码:

{% gist 743cdf8b26ceeef49fa1 %}

其中{% gist GIST_ID %}是固定格式,你只需找到实际的Gist ID代替GIST_ID

因为一个Gist可以有几个文件,还可以只嵌入某个Gist中的某个文件,如下:

@v5tech
v5tech / app.js
Created August 9, 2014 14:37 — forked from auser/app.js
Rapid chrome app development with angular. http://www.ng-newsletter.com/posts/chrome-apps-on-angular.html
angular.module('myApp', ['ngRoute'])
.provider('Weather', function() {
var apiKey = "";
this.getUrl = function(type, ext) {
return "http://api.wunderground.com/api/" +
this.apiKey + "/" + type + "/q/" +
ext + '.json';
};
@v5tech
v5tech / rename.md
Last active January 19, 2023 03:48
巧妙使用cmd和xls批量重命名文件

巧妙使用cmd和xls批量重命名文件

1. 迅速切换到目标文件目录

C:\Windows\System32>cd /d E:\images

E:\images>