Skip to content

Instantly share code, notes, and snippets.

@AlanJui
AlanJui / init.vim
Last active February 5, 2021 07:45
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer:
" Alan Jui : [email protected]
"
" Version:
" V 0.4.0 2019/07/01 00:14
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Vagrant.configure("2") do |config|
config.vm.box = "peru/ubuntu-18.04-desktop-amd64"
config.vm.box_version = "20190401.01"
# config.vm.network "public_network"
# config.vm.network "public_network", ip: "192.168.66.41"
config.vm.network "public_network", bridge: "enp5s0", ip: "192.168.66.42"
# config.vm.network "public_network", auto_config: false
@AlanJui
AlanJui / TypeScript-Demo.ts
Last active November 28, 2015 16:44
實作 TypeScript 在 Class, Interface 的應用。
interface IWellcome {
greet(): any;
}
class User {
firstName: string;
lastName: string;
constructor(firstName: string, lastName: string) {
this.firstName = firstName;
@AlanJui
AlanJui / API Test
Created October 2, 2015 04:44
API 測試,使用 NPM Modules: supertest, should
/**
* Created by AlanJui on 15/10/1.
*/
var should = require('should');
var request = require('supertest');
var mongodb = require('mongodb');
var MongoClient = mongodb.MongoClient;
var ObjectID = mongodb.ObjectID;
var tools = require('../libs/tools');

My environment:

[![enter image description here][1]][1]

  • Host
  • Mac OS X 10.10.5
  • Network: 192.168.99.0/24
  • IP: 192.168.99.110 (Static IP)
@AlanJui
AlanJui / gist:9546c8436c45536f535f
Last active August 29, 2015 14:14
目的:示範 Java 程式碼基本架構。
/**
* Say Hello to Java!!
*/
public class HelloJava {
public static void main(String args[]) {
System.out.println("Hello Java!!");
}
}
<ul>
<li></li>
<li></li>
<li></li>
</ul>
package tw.ccc99.bpandsvc;
/**
* Created by AlanJui on 2014/5/17.
*/
import java.util.*;
public class RentABike {