Skip to content

Instantly share code, notes, and snippets.

翁治平 gocreating

  • Taiwan
View GitHub Profile
gocreating / my-model.js
Created Sep 20, 2018 — forked from pulkitsinghal/my-model.js
Non-Static (instance) remote methods for loopback
View my-model.js
var loopback = require('loopback');
// HINT(s):
// Getting the app object:
// From a model script:
module.exports = function(StoreModel) {
StoreModel.prototype.instanceRemoteMethodSignature = function(cb) {
console.log('print this instance object: ', this);
gocreating / gist:b391b81e65698b7223ce78a1cb9f3cd1
Created Oct 23, 2016 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
View gist:b391b81e65698b7223ce78a1cb9f3cd1
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
You can’t perform that action at this time.