forked from rstacruz/cheatsheets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update cordova, mixpanel, minimist, etc.
- Loading branch information
Showing
5 changed files
with
169 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters