Skip to content

Instantly share code, notes, and snippets.

View ZengruiWang's full-sized avatar

ghostfacechillah ZengruiWang

  • Hulu, LLC
  • Los Angeles, CA, USA
View GitHub Profile
git clone <repo-address>
git tag -l
git checkout <tag-name>
git branch -D master
git checkout -b master
@ZengruiWang
ZengruiWang / gist:0d19d15a6eb20810e6db
Created January 11, 2016 17:46
compare a branch against trunk in subversion(Windows)
Right-click any folder. From the context menu, select TortoiseSVN -> Repo-browser.
Enter your repo address in the URL box.
Navigate to the first folder which you want to compare. Right-click and select Mark for comparison.
Navigate to the second folder. Right-click and select Compare URLs
@ZengruiWang
ZengruiWang / AWS + FileZila
Created February 21, 2016 03:07
Connect to Amazon EC2 file directory using Filezilla and SFTP
1. Open FileZila, select Edit->Settings->SFTP, Add Keyfile(.pem coverts to .ppk)
2. File->SiteManager->New Site
Enter host, protocol and other info, connect, done
@ZengruiWang
ZengruiWang / multipart.java
Created March 22, 2016 22:34 — forked from mcxiaoke/multipart.java
multipart request using httpurlconnection
public String multipartRequest(String urlTo, String post, String filepath, String filefield) throws ParseException, IOException {
HttpURLConnection connection = null;
DataOutputStream outputStream = null;
InputStream inputStream = null;
String twoHyphens = "--";
String boundary = "*****"+Long.toString(System.currentTimeMillis())+"*****";
String lineEnd = "\r\n";
String result = "";