Mình rất bực tức và ghen tị mỗi khi vào một blog nào đó, thấy nó hiển thị code trong bài viết rõ là đẹp đẽ tuyệt vời như này:
https://gist.github.com/hongthaiphi/da74a34fc48ec867e4462d158fa35ee4
trong khi code trong blog của mình thì xấu như này
/**
* User object contains user ID as an integer, and 5 fields of generic object
* In this example, 5 fields of generic objects are associate with some primitive types
*/
static class User {
// userID is a number
private Integer userID;
// generic type of float number
private Float field1;
// generic type of integer number
private Short field2;
// generic type of boolean number
private Boolean field3;
// generic type of byte number
private Byte field4;
// generic type of long number
private Long field5;
}
Giải pháp hóa ra đơn giản đến không ngờ, vào https://gist.github.com/ – tất nhiên phải đăng nhập, sau đó paste đoạn code của bạn vào, chọn tên file với đuôi đúng loại, ví dụ java, js…, save lại, rồi copy cái link Share, paste thẳng vào wordpress, thế là xong con ong.