Skip to content

Instantly share code, notes, and snippets.

View ichaiwut's full-sized avatar
🐢
Slowly

TingSter ichaiwut

🐢
Slowly
View GitHub Profile
export class DetailPage() {
constructor(public navCtrl: NavController) {}
isValid() {
return (validValue) ? true : false;
}
ionViewCanEnter(): boolean {
return this.isValid();
}
}
@ichaiwut
ichaiwut / nav1.ts
Last active June 16, 2017 09:25
Nav Guard 1
export class MyClass {
constructor (public navCtrl: NavController) {}
//When trying to leave the page will call
//ionViewCanLeave()
pushPage() {
this.navCtrl.push(DetailPage)
.catch(()=> console.log(‘Something cache!))
}
isValid() {
return (validValue) ? true : false;
@ichaiwut
ichaiwut / gist:8818519
Last active August 29, 2015 13:56
Install Jekyll
$gem install jekyll
$jekyll new ichaiwut.me
$cd ichaiwut.me
$jekyll serve

Things to do after install Ubuntu

  • Update all packages
  • Install Unity2D
  • Install Vim sudo apt-get install vim
  • Change default editor to be Vim editor-select
  • Install Google Chrome http://www.google.com/chrome
  • Customize terminal prompt .bashrc and .vimrc
  • Install LAMP sudo apt-get install tasksel
  • Install PHPMyAdmin sudo apt-get install phpmyadmin