Skip to content

Instantly share code, notes, and snippets.

@yadudoc
yadudoc / 2 EMA vs. 3 EMA
Created December 23, 2013 20:00
2-EMA vs 3-EMA comparison. I use a 3-EMA Ruby cross instead of a simple 2-EMA cross. Here's some simple stats which show performance difference on Bitcoin/USD on MtGox.
I ran a parameter sweep backtest with 2 EMA crosses, with EMAs in range 0,70 on
$5000 USD on MtGox.
Starting date : 2012-12-31 16:00:00
Ending date : 2013-12-16 05:00:00
Simulation on 1 hour candles from MtGox.
Here's the results from running simple 2 EMA crosses, sorted by final USD balance
EMA1, EMA2, FINAL_USD
9, 29, 840301.79202999303
@mrmusa
mrmusa / Native Select Menu for List
Created December 16, 2013 18:52
simple native select menu hack for developers using ionic framework
<label class="item item-icon-right">
<select style="opacity:0; width:100%; position:absolute; z-index=100" ng-options="option for option in question.options">
<option value="">Select...</option>
</select>
<span class="input-label">Input Label:</span>
<span class="item-note">Your answer was {{ question.responses[0] }}</span>
<i class="icon ion-ios7-arrow-down"></i>
</label>
@bavey
bavey / common-mysql-cli-commands.md
Last active May 26, 2020 02:28
Common MySQL CLI Commands

Common MySQL CLI Commands

The following commands are organized by their CRUD functionality. This was designed to be a quick 'n easy cheat sheet.

Sample Data

Database: savetheworld
Table: superheros

id superhero password email age
1 batman badpassword batman@superhero.com 40
function drawMouseSpeedDemo() {
var mrefreshinterval = 500; // update display every 500ms
var lastmousex=-1;
var lastmousey=-1;
var lastmousetime;
var mousetravel = 0;
var mpoints = [];
var mpoints_max = 30;
$('html').mousemove(function(e) {
var mousex = e.pageX;
@artero
artero / launch_sublime_from_terminal.markdown
Last active May 15, 2024 03:38 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@ernie
ernie / GoDaddy CLI
Created April 6, 2011 15:45
If GoDaddy did CLI domain registration...
$ godaddy buy wynn.fm
-- Reading CC Info from .godaddy...
-- THANK YOU FOR PURCHASING YOUR DOMAIN WITH GODADDY!
-- WHILE OUR SERVERS THINK ABOUT REGISTERING YOUR DOMAIN
-- NAME, PLEASE GIVE CAREFUL CONSIDERATION TO THE
-- FOLLOWING SPECIAL OFFERS!!!
Would you like to also register the following and SAVE 64%?
wynn.net