Skip to content

Instantly share code, notes, and snippets.

View aikchun's full-sized avatar
🎯
Focusing

Aik Chun aikchun

🎯
Focusing
View GitHub Profile
@aikchun
aikchun / .vim
Last active December 29, 2015 21:19
vimrc
let mapleader=","
" load plugins
execute pathogen#infect()
let g:EasyMotion_leader_key = '<Leader>'
map <F2> :NERDTreeToggle<CR>
let NERDTreeShowLineNumbers=1
let NERDTreeShowHidden=1
" General configuration
@aikchun
aikchun / 0_reuse_code.js
Created December 1, 2013 07:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
public function successfulSomething($data) {
$email = $this->email;
$email->subject('You have successfully done something:' . $data['title']);
$email->template('successful_done');
// This is outdated
// $email->sendAs = 'text';
$email->emailFormat('html'); // This will allow the view to use html tags to be reflected in the email.
$email->viewVars(array('data' => $data); // set multiple variables into email view.
#!/bin/bash
###
#
# forked from https://gist.github.com/1264701/08f93534ba177f173b9382b53c419cd0de5b07ea
# Copyright (c) 2011 Cake Development Corporation (http//cakedc.com)
#
# Ubuntu 12.10 based web server installation script
# Run this by executing the following from a fresh install of Ubuntu 12.10 server:
#
@aikchun
aikchun / OptionPane.java
Created May 26, 2013 06:45
This OptionPane is to show how to customize JOptionPane showOptionDialog with YES_NO_OPTION
import java.util.*;
import javax.swing.*;
import java.awt.*;
import java.io.*;
public class OptionPane {
public static void main(String []args){
Object[] options = { "OK", "Cancel" };
int choice = JOptionPane.showOptionDialog(null, "Do you want to quit?",
"Exiting",
JOptionPane.YES_NO_OPTION,
Human::Human(){
// what you want the function to do
}
String Human::getName(){
// what you want the function to do
}
void Human::setAddress(string){
//what you wan the function to do
import java.util.*;
import java.io.*;
public class TestTry{
public static void main(String []args){
int a = 5;
int b = receiveNumberFromUser();
}