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 | |
$list = array( | |
array('page_id' => '3', | |
'url' => '/johtamisjarjestelma/yritys', | |
'title' => 'Yritys'), | |
array( | |
'page_id' => '4', | |
'url' => '/johtamisjarjestelma/yritys/historia', | |
'title' => 'Historia'), |
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 | |
""" | |
statistics for netstat tcp | |
""" | |
from pprint import pformat | |
from optparse import OptionParser,OptionGroup | |
import re | |
import socket | |
import sys |
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
test=# create table j (id1 int, id2 int); | |
CREATE TABLE | |
test=*# create unique index idx_j on j(greatest(id1, id2), least(id1, id2)); | |
CREATE INDEX | |
test=*# insert into j values (1,2); | |
INSERT 0 1 | |
test=*# insert into j values (2,1); | |
ERROR: duplicate key violates unique constraint "idx_j" |
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 | |
################################################## | |
# little programming exercise using twisted irc | |
# ibot is a infobot which whole purpose is to | |
# autorespond to a defined set of keywords with | |
# a stored phrase | |
# $Id: bot.py,v 1.4 2003/12/14 13:38:29 pfote Exp $ | |
################################################## |
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 | |
# whats mysql? MySQLdb? | |
from mysql.connector import errorcode, connect, Error | |
class JobQueue: | |
"""docstrings are missing""" | |
def __init__(self, dbConfig): | |
"""docstrings for methods as well""" |
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
[2013-02-28 15:53:39] codeigniter.DEBUG: Monolog replacement logger initialized | |
[2013-02-28 15:53:39] codeigniter.DEBUG: Config Class Initialized | |
[2013-02-28 15:53:39] codeigniter.DEBUG: Hooks Class Initialized | |
[2013-02-28 15:53:39] codeigniter.DEBUG: Utf8 Class Initialized | |
[2013-02-28 15:53:39] codeigniter.DEBUG: UTF-8 Support Enabled | |
[2013-02-28 15:53:39] codeigniter.DEBUG: URI Class Initialized | |
[2013-02-28 15:53:39] codeigniter.DEBUG: Router Class Initialized | |
[2013-02-28 15:53:39] codeigniter.DEBUG: No URI present. Default controller set. | |
[2013-02-28 15:53:39] codeigniter.DEBUG: Output Class Initialized | |
[2013-02-28 15:53:39] codeigniter.DEBUG: Security Class Initialized |
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
#!/bin/sh | |
# script zum lifestellen | |
cd /var/www/ypsilon_git | |
revision=$1 | |
host=`hostname` | |
if [ x$revision == 'x' ]; then | |
revision='master' | |
fi |
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
<IfModule mod_php5.c> | |
<FilesMatch "\.ph(p3?|tml)$"> | |
SetHandler application/x-httpd-php | |
</FilesMatch> | |
<FilesMatch "\.phps$"> | |
SetHandler application/x-httpd-php-source | |
</FilesMatch> | |
# To re-enable php in user directories comment the following lines | |
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it | |
# prevents .htaccess files from disabling it. |
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
function is_write_type($sql) | |
{ | |
if (( ! preg_match('/^\s*"?(SET|INSERT|UPDATE|DELETE|REPLACE|CREATE|DROP|TRUNCATE|LOAD DATA|COPY|ALTER|GRANT|REVOKE|LOCK|UNLOCK)\s+/i', $sql)) | |
AND | |
( ! preg_match('/^\s*INSERT.*RETURNING\s+[\w\*,]+$/i', $sql)) | |
) | |
{ | |
return FALSE; | |
} | |
return TRUE; |
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
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import Select | |
from selenium.common.exceptions import NoSuchElementException | |
import unittest, time, re | |
class FlwebBookingWebdriver(unittest.TestCase): | |
def setUp(self): | |
self.driver = webdriver.Firefox() | |
self.driver.implicitly_wait(30) |
OlderNewer