Skip to content

Instantly share code, notes, and snippets.

@Lothiraldan
Lothiraldan / pelican.patch
Created Apr 6, 2011
Add support for translations into notmyidea-cms theme
We couldn’t find that file to show.
@Lothiraldan
Lothiraldan / gist:905361
Created Apr 6, 2011
Omission of article_infos in index template
View gist:905361
From 28011b22beb3da18c3b1cc863cd415fffb4c40d7 Mon Sep 17 00:00:00 2001
From: FELD Boris <lothiraldan@gmail.com>
Date: Wed, 6 Apr 2011 10:52:51 +0200
Subject: [PATCH 2/2] Omission of article_infos in index template
---
notmyidea-cms/templates/index.html | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/notmyidea-cms/templates/index.html b/notmyidea-cms/templates/index.html
@Lothiraldan
Lothiraldan / gist:905362
Created Apr 6, 2011
Move articles infos into article_infos template
View gist:905362
From a2eb43ec131512743f2a61d3e382dbc3dda26576 Mon Sep 17 00:00:00 2001
From: FELD Boris <lothiraldan@gmail.com>
Date: Wed, 6 Apr 2011 10:21:09 +0200
Subject: [PATCH] Move articles infos into article_infos template
---
notmyidea-cms/templates/article.html | 14 +-------------
notmyidea-cms/templates/article_infos.html | 14 ++++++++++++++
notmyidea-cms/templates/index.html | 15 +--------------
3 files changed, 16 insertions(+), 27 deletions(-)
@Lothiraldan
Lothiraldan / gist:905390
Created Apr 6, 2011
Add support for pagination in notmyidea-cms theme
View gist:905390
From 8790b3702910236185f6fd08f39420ace407e69e Mon Sep 17 00:00:00 2001
From: FELD Boris <lothiraldan@gmail.com>
Date: Wed, 6 Apr 2011 11:27:22 +0200
Subject: [PATCH] Add support for pagination in notmyidea-cms theme
---
notmyidea-cms/templates/index.html | 20 +++++++++++++++-----
notmyidea-cms/templates/pagination.html | 12 ++++++++++++
2 files changed, 27 insertions(+), 5 deletions(-)
create mode 100644 notmyidea-cms/templates/pagination.html
@Lothiraldan
Lothiraldan / client.py
Created May 25, 2011
Client socketServer
View client.py
import socket
import sys
HOST, PORT = "localhost", 9999
data = str(sys.argv[1])
# Create a socket (SOCK_STREAM means a TCP socket)
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Connect to server and send data
View script.py
from pyti.vmanager.diskhandler import *
from pyti.vmanager.vms import *
import time
import sys
from os import getcwd
from os.path import join
hd_location = join(getcwd(), sys.argv[1])
@Lothiraldan
Lothiraldan / test_first.py
Created Oct 10, 2011
First solution with a loop inside test method.
View test_first.py
import unittest
def support_http_protocol(protocol):
if protocol in ('POST', 'GET'):
return True
else:
return False
class SupportHttpProtocolTestCase(unittest.TestCase):
@Lothiraldan
Lothiraldan / test_first_broken.py
Created Oct 10, 2011
Example with for in test method and a typo in function.
View test_first_broken.py
import unittest
def support_http_method(method):
if method in ('POST', 'GETT'):
return True
else:
return False
class SupportHttpMethodTestCase(unittest.TestCase):
@Lothiraldan
Lothiraldan / test_second.py
Created Oct 10, 2011
Example with nosetest test generator.
View test_second.py
def support_http_method(method):
if method in ('POST', 'GET'):
return True
else:
return False
def test_support():
expected_values = {
'POST': True,
'GET': True,
@Lothiraldan
Lothiraldan / test_second_broken.py
Created Oct 10, 2011
Example with nosetest test generator and a typo in the function.
View test_second_broken.py
def support_http_method(method):
if method in ('POST', 'GETT'):
return True
else:
return False
def test_support():
expected_values = {
'POST': True,
'GET': True,
You can’t perform that action at this time.