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 | |
import redis | |
from optparse import OptionParser | |
from benchmarker import Benchmarker | |
parser = OptionParser() | |
parser.add_option("-n", "--num", dest="num", action="store", | |
help="iterate number", type="int", default=10000) |
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 | |
from sqlalchemy import create_engine | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, Integer, String | |
from sqlalchemy.orm import sessionmaker | |
engine = create_engine('sqlite:///:memory:', echo=True) | |
Session = sessionmaker(bind=engine) | |
Base = declarative_base() |
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 | |
from fabric.api import local, sudo, hosts, env | |
env.warn_only = True | |
env.skip_bad_hosts = True | |
def localup(): | |
local('sudo apt-get update && sudo apt-get upgrade') |
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 -*- | |
""" | |
phpdoc_rev_compare.py | |
Description: | |
php ドキュメントのリポジトリのうち、マスタとなる | |
en と 日本語 の ja を比較し、以下の情報を出力する |
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
package org.mumumu.test; | |
import java.io.ByteArrayOutputStream; | |
import magick.ImageInfo; | |
import magick.MagickImage; | |
import org.apache.sanselan.Sanselan; | |
import org.apache.sanselan.common.IImageMetadata; | |
import org.apache.sanselan.formats.jpeg.JpegImageMetadata; |
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
javascript:var elms=document.getElementsByTagName('a');for(var i=0;i<elms.length;i++){elms[i].setAttribute('target','_blank');} |
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
mumumu@www 17:12:11$ python | |
Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) | |
[GCC 4.4.5] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> def test(a = []): | |
... a.append(10) | |
... print a | |
... | |
>>> test() | |
[10] |
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
Index: ChangeLog | |
=================================================================== | |
--- ChangeLog (リビジョン 3764) | |
+++ ChangeLog (リビジョン 4660) | |
@@ -1,3 +1,8 @@ | |
+2012-09-24 Uwe Tews | |
+ | |
+ * Fixed escape Smarty error messages to avoid possible script execution | |
+ | |
+ |
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
/** | |
* This method ensures that the output String has only | |
* valid XML unicode characters as specified by the | |
* XML 1.0 standard. For reference, please see | |
* <a href="http://www.w3.org/TR/2000/REC-xml-20001006#NT-Char">the | |
* standard</a>. This method will return an empty | |
* String if the input is null or empty. | |
* | |
* @param in The String whose non-valid characters we want to remove. | |
* @return The in String, stripped of non-valid characters. |
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/perl -w | |
use strict; | |
use warnings; | |
use IO::Socket; | |
use Data::Dumper; | |
my $socket = IO::Socket::INET->new( | |
Proto => 'tcp', | |
Type => SOCK_STREAM |