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
<?php | |
/** | |
* License: GPL3 | |
* (c) Siim Haugas 2011 | |
*/ | |
class Nordea{ | |
protected $fields = array(); | |
function __construct(){ | |
$stamp = time(); | |
$this->fields = array( |
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
FILE1: login.php | |
function() login | |
{ | |
$sql = ...; | |
$data = ...; | |
//assign data to template... | |
function assign(...); |
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
server.modules += ( "mod_fastcgi","mod_rewrite","mod_compress" ) | |
server.document-root = "/home/siim/web/pub/ochart/upload" | |
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) | |
server.dir-listing = "enable" | |
index-file.names = ("index.php","index.html") | |
server.port = 3000 | |
server.name = "neoon.mine.nu" | |
mimetype.assign = ( |
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
#include <windows.h> | |
#include <stdio.h> | |
void coolSleep(int count) | |
{ | |
int i; | |
for(i=count; i>=0; i--){ | |
printf(".",i); | |
Sleep(1000); | |
} |
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
import System.Environment (getArgs) | |
main = do | |
filenames <- getArgs | |
case null filenames of | |
True -> interact id | |
False -> putStr . concat =<< mapM readFile filenames |
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
import Data.Time.Clock | |
import Data.Time.Calendar | |
import Data.Time.LocalTime | |
-- TODO: printMonth with custom args | |
-- move printMonth to printCurrnentMonth | |
date :: IO (Integer,Int,Int) -- :: (year,month,day) | |
date = getZonedTime >>= return . toGregorian . localDay . zonedTimeToLocalTime | |
leap = date >>= (\(y,_,_) -> return $ isLeap y) |
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
#!/usr/bin/env python | |
from optparse import OptionParser | |
parser = OptionParser() | |
parser.add_option( | |
"-f","--file", | |
dest="filename", | |
help="Convert TomTom CSV contacts to VCF", | |
metavar="FILE" |
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
-module(split). | |
-export([tokens/2]). | |
-export([len/1]). | |
-export([substr/3]). | |
tokens(String, Limiter) -> | |
tokens(String, Limiter, [], []). | |
tokens([], _Limiter, Sub, Res) -> | |
[lists:reverse(Sub)|Res]; |