Skip to content

Commit

Permalink
Update cordova, mixpanel, minimist, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
rstacruz committed Sep 5, 2014
1 parent bd4ab84 commit b123a1b
Show file tree
Hide file tree
Showing 5 changed files with 169 additions and 41 deletions.
44 changes: 44 additions & 0 deletions analytics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: Analytics
layout: default
---

### Mixpanel

Identify:

mixpanel.identify('284');
mixpanel.people.set({ $email: 'hi@gmail.com' });
mixpanel.register({ age: 28, gender: 'male' }); /* set common properties */

Events:

mixpanel.track('Login success');
mixpanel.track('Search', { query: 'cheese' });

References:

* https://mixpanel.com/help/reference/javascript

### analytics.js

ga('create', 'UA-XXXX-Y', 'auto');
ga('create', 'UA-XXXX-Y', { userId: 'USER_ID' });

ga('send', 'pageview');
ga('send', 'pageview', { 'dimension15': 'My custom dimension' );

Events:

ga('send', 'event', 'button', 'click', {color: 'red'});
ga('send', 'event', 'button', 'click', 'nav buttons', 4);
/* ^category ^action ^label ^value */

Exceptions:

ga('send', 'exception', {
exDescription: 'DatabaseError',
exFatal: false,
appName: 'myapp',
appVersion: '0.1.2'
})
66 changes: 30 additions & 36 deletions badges.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,30 @@ layout: default

Here are some badges for open source projects.

### Badges

* Everything: http://shields.io/

* Version badge (gems, npm): http://badge.fury.io/

* Dependencies (ruby): http://gemnasium.com/

* CI: http://travis-ci.org/

* Code quality (ruby): http://codeclimate.com/

* Test coverage: https://coveralls.io/

### Badge markdown

[![Status](https://travis-ci.org/rstacruz/ento.svg?branch=master)](https://travis-ci.org/rstacruz/ento)
Travis
[![Status](https://travis-ci.org/rstacruz/REPO.svg?branch=master)](https://travis-ci.org/rstacruz/REPO)

### Versions
Travis (shields.io)
[![Status](http://img.shields.io/travis/rstacruz/REPO/master.svg?style=flat)](https://travis-ci.org/rstacruz/REPO "See test builds")

[![npm version](https://img.shields.io/npm/v/jquery.svg)](https://npmjs.org/package/jquery "View this project on npm")
[![npm version](https://badge.fury.io/js/jquery.svg)](https://npmjs.org/package/jquery "View this project on npm")
[![Gem version](https://img.shields.io/gem/v/rails.svg)](http://rubygems.org/gems/rails "View this project in Rubygems")
[![Latest version](http://img.shields.io/github/tag/rstacruz/nprogress.svg)](https://github.com/rstacruz/nprogress)
NPM (shields.io)
[![npm version](http://img.shields.io/npm/v/REPO.svg?style=flat)](https://npmjs.org/package/REPO "View this project on npm")

### Links
Ruby gem (shields.io)
[![Gem](https://img.shields.io/gem/v/GEMNAME.svg?style=flat)](http://rubygems.org/gems/GEMNAME "View this project in Rubygems")

[![npm](https://img.shields.io/badge/npm-jquery-brightgreen.png)](https://npmjs.org/package/jquery "View this project on npm")
[![Gem](https://img.shields.io/gem/v/gem-rails-brightgreen.png)](http://rubygems.org/gems/rails "View this project in Rubygems")
### Etc

[![Gitter chat](https://badges.gitter.im/USER/REPO.png)](https://gitter.im/USER/REPO "Gitter chat")

Gitter chat
[![Gitter chat](https://badges.gitter.im/USER/REPO.png)](https://gitter.im/USER/REPO "Gitter chat")

[![Chat](http://img.shields.io/badge/gitter-rstacruz / nprogress-blue.svg)]( https://gitter.im/rstacruz/nprogress )

Gitter chat (shields.io)
[![Chat](http://img.shields.io/badge/gitter-USER / REPO-blue.svg)]( https://gitter.im/USER/REPO )

[![Development Dependency Status](https://david-dm.org/USER/REPO/dev-status.png?theme=shields.io)](https://david-dm.org/USER/REPO#info=devDependencies)

[![Development Dependency Status](https://david-dm.org/USER/REPO/dev-status.png?theme=shields.io)](https://david-dm.org/USER/REPO#info=devDependencies)
david-dm
[![Dependencies](http://img.shields.io/david/rstacruz/REPO.svg?style=flat)](https://david-dm.org/rstacruz/REPO)

[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)

Expand Down Expand Up @@ -83,20 +65,32 @@ Here are some badges for open source projects.
$ bower install --save nprogress
$ npm install --save nprogress

[![npm version](https://img.shields.io/npm/v/nprogress.png)](https://npmjs.org/package/nprogress "View this project on npm")
[bower]: http://bower.io/search/?q=nprogress
[npm]: https://www.npmjs.org/package/nprogress

### Acknowledgements

## Thanks

**Jsfuse** © 2014+, Rico Sta. Cruz. Released under the [MIT License].<br>
Authored and maintained by Rico Sta. Cruz with help from [contributors].
**PROJECTNAME** © 2014+, Rico Sta. Cruz. Released under the [MIT] License.<br>
Authored and maintained by Rico Sta. Cruz with help from contributors ([list][contributors]).

> [ricostacruz.com](http://ricostacruz.com) &nbsp;&middot;&nbsp;
> GitHub [@rstacruz](https://github.com/rstacruz) &nbsp;&middot;&nbsp;
> Twitter [@rstacruz](https://twitter.com/rstacruz)

[MIT License]: http://mit-license.org/
[MIT]: http://mit-license.org/
[contributors]: http://github.com/rstacruz/nprogress/contributors

### Links

* Everything: http://shields.io/

* Version badge (gems, npm): http://badge.fury.io/

* Dependencies (ruby): http://gemnasium.com/

* CI: http://travis-ci.org/

* Code quality (ruby): http://codeclimate.com/

* Test coverage: https://coveralls.io/

26 changes: 26 additions & 0 deletions cordova.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Cordova
layout: default
---

cordova plugin ls
cordova plugin search facebook
cordova plugin add com.phonegap.plugins.facebookconnect

cordova platform add ios
cordova platform ls
cordova platform update ios
cordova platform check

### Some plugins

You'll likely need these:

* [org.apache.cordova.console](https://github.com/apache/cordova-plugin-console)
* [org.apache.cordova.inappbrowser](https://github.com/apache/cordova-plugin-inappbrowser)
* [org.apache.cordova.statusbar](https://github.com/apache/cordova-plugin-statusbar)
* org.apache.cordova.splashscreen

Also:

* com.phonegap.plugins.facebookconnect
61 changes: 61 additions & 0 deletions git-extras.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: Git extras
layout: default
---

### Git-flow

$ git feature myfeature
switched to branch 'feature/rofl'

$ ...
$ git checkout develop
$ git feature finish myfeature
merging 'feature/rofl' into develop
deleted branch 'feature/rofl'

Also `git-bug` and `git-refactor`.

### Branches

$ git delete-merged-branches
# hint: do `git remote prune origin` after

$ git create-branch development
$ git delete-branch development

$ git fresh-branch gh-pages

### Inspecting

$ git summary # repo age, commits, active days, etc
$ git impact # impact graph
$ git effort # commits per file

### Github

$ git fork strongloop/express

### Tags

$ git release v1.0.0 # commit, tag, push-tags
$ git delete-tag v1.0.0

### Conveniences

$ git ignore "*.log"

### Locking

Assumes that changes will not be committed.

$ git lock config/database.yml
$ git unlock config/database.yml

### Etc

$ git obliterate secret.yml # remove all references to it

### References

* https://github.com/visionmedia/git-extras
13 changes: 8 additions & 5 deletions minimist.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ args == {
```

```js
if (args.help) {
if (args.help || args._.length === 0) {
var cmd = require('path').basename(process.argv[1]);
console.log(require('fs').readFileSync(__dirname+'/../help.txt','utf-8').replace(/\$0/g, cmd));
].join('\n'));
console.log(
require('fs')
.readFileSync(__dirname+'/../help.txt','utf-8')
.replace(/\$0/g, cmd)
.trim());
process.exit();
}

Expand All @@ -36,11 +39,11 @@ if (args.version) {

```
Usage:
$0 FILES [options]
$0 FILES [options]
Options:
-h, --help print usage information
-V, --version show version info and exit
-v, --version show version info and exit
```

### Reference
Expand Down

0 comments on commit b123a1b

Please sign in to comment.