Skip to content

Instantly share code, notes, and snippets.

View davetromp's full-sized avatar

Dave Tromp davetromp

View GitHub Profile
@davetromp
davetromp / GetDataFromYahooFinance.sh
Created November 18, 2012 16:29
Get data from yahoo finance
#!/bin/bash
# This will be a little script to pull price data from Yahoo finance in order to run a trading stategy on it.
# this function will be called to collect all needed input variabels
function SetVars(){
echo ticker?
read ticker
echo "timeframe (d/w/m)?" # yahoo provide daily, weekly and monthly ohlc prices
read timeframe
@davetromp
davetromp / davetromp
Created September 16, 2012 19:59
Virtualhost file
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName davetromp
DocumentRoot /home/davetromp/Lamp
<Directory />
Options FollowSymLinks
AllowOverride All
Allow from all
</Directory>
@davetromp
davetromp / login.php
Created September 11, 2012 19:21
Login
<?php
session_start();
if ($_SESSION['login'] == '1'){
echo 'U bent ingelogd';
}
if (!isset($_SESSION['login']) || $_SESSION['login'] == '0') { //als er nog geen sessie is of hij is aan 0 / uitgelogd
if ($_POST['submit']=='Login'){
$query = "SELECT * FROM `users` WHERE `user` = '{$_POST['loginUser']}'";