Skip to content

Instantly share code, notes, and snippets.

Avatar

Carlos Mantilla ceoaliongroo

  • Migdal
  • Israel
View GitHub Profile
View javascript option stuff.js
/* Returns probability of occuring below and above target price. */
function probability(price, target, days, volatility) {
var p = price;
var q = target;
var t = days / 365;
var v = volatility;
var vt = v*Math.sqrt(t);
var lnpq = Math.log(q/p);
@ceoaliongroo
ceoaliongroo / ExcelFormulas.js
Created Jun 7, 2016 — forked from pies/ExcelFormulas.js
Few Excel formulas - PMT, PPMT, XIRR - expressed in Javascript
View ExcelFormulas.js
/* Based on
* - EGM Mathematical Finance class by Enrique Garcia M. <egarcia@egm.co>
* - A Guide to the PMT, FV, IPMT and PPMT Functions by Kevin (aka MWVisa1)
*/
var ExcelFormulas = {
PVIF: function(rate, nper) {
return Math.pow(1 + rate, nper);
},
View 030_update_platform_config.js
#!/usr/bin/env node
/** This hook updates platform configuration files based on preferences and config-file data defined in config.xml.
Currently only the AndroidManifest.xml and IOS *-Info.plist file are supported.
See http://stackoverflow.com/questions/28198983/ionic-cordova-add-intent-filter-using-config-xml
Preferences:
1. Preferences defined outside of the platform element will apply to all platforms
2. Preferences defined inside a platform element will apply only to the specified platform
@ceoaliongroo
ceoaliongroo / 0_reuse_code.js
Created Nov 27, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ceoaliongroo
ceoaliongroo / .bash_profile
Last active Nov 24, 2015
My .bash_profile
View .bash_profile
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# Set PATH
export PATH="/Applications/MAMP/Library/bin/:$PATH"
@ceoaliongroo
ceoaliongroo / favorites
Last active Aug 29, 2015
Git favorites
View favorites
https://github.com/pemrouz/popper
https://github.com/lapwinglabs/bare-auth
https://github.com/stevenmiller888/mind
@ceoaliongroo
ceoaliongroo / ndDebug.html
Last active Aug 29, 2015
angular debug webcomponent
View ndDebug.html
<!-- Debug -->
<style>
pre.debug {
font-size: 11px;
position: fixed;
top: 130px;
left: 40px;
overflow-y: scroll;
direction: ltr;
max-height: 80%;
You can’t perform that action at this time.