Skip to content

Instantly share code, notes, and snippets.

###Command line

gradle wrapper --gradle-version 2.14

###Edit root build.gradle

task wrapper(type: Wrapper){
    gradleVersion = 2.14
}
@johngan
johngan / laravel-service-container.md
Last active June 15, 2016 08:38
Laravel Service Container

##Binding object to Laravel Service Container

###bind to container

App::bind('foo', function(){
    return 1;
});

###Singleton

@johngan
johngan / Android.gitignore
Created June 15, 2016 06:35
Android Notes
```
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class

Set environment variable

echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc

Re-login

source ~/.bashrc
@johngan
johngan / Errors.md
Last active October 27, 2016 00:17
Laravel 5

Class some controller path does not exist

The API return error like this:

{
  "message": "Class Api\\Controllers\\AuthController does not exist",
  "status_code": 500,
  "debug": {
    "line": 280,
...
@johngan
johngan / Git-Cheatsheet.md
Last active November 3, 2016 07:14
Git Cheatsheet

Git-Cheatsheet

###Add existing Repository to Git

git init
git add .
git commit -m "Initial commit"
git remote add origin <project url>
git push -u origin master