This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 psycopg2 | |
import psycopg2.extensions | |
from select import select | |
from twisted.internet import threads | |
class AsyncNotify(): | |
""" | |
based on http://divillo.com/, adapted to newer psycopg version | |
Class to trigger a function via PostgreSQL NOTIFY messages. |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 | |
# -*- coding: utf-8 -*- | |
from Crypto.Cipher import AES | |
import base64 | |
import random | |
import hashlib | |
import os | |
class AesCrypt256: |
This file contains hidden or 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 hidden or 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) |
NewerOlder