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 python2 | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
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
/* | |
* This is a modified version of the ck editor integration from the public | |
* domain source in http://www.sencha.com/forum/showthread.php?79031. | |
* | |
* Fixed issues when loading multiple editors in multiple TabPanels, wrong calls | |
* to the superclass methods. | |
*/ | |
Ext.namespace("Ext.ux.form"); |
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
# -*- coding: utf-8 -*- | |
""" | |
Extension for FeinCMS Page | |
""" | |
from django.conf import settings | |
from django.db import models | |
from django.contrib.sites.models import Site | |
from django.contrib.sites.managers import CurrentSiteManager | |
from django.utils.translation import ugettext_lazy as _ | |
from feincms.module.page.models import Page, PageManager |
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 __future__ import with_statement | |
from fabric.api import env, run, settings, hide | |
from fabric.decorators import hosts, runs_once | |
venv = "/home/websites/.virtualenvs/twtv3/" | |
env.user = 'webdev' | |
env.hosts = [ | |
'192.168.1.10', | |
'192.168.1.11', |
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
<!doctype html> | |
<html> | |
<head> | |
<!-- All JavaScript at the bottom, except for Modernizr which enables HTML5 elements & feature detects --> | |
<script src="js/modernizr-1.6.min.js"></script> | |
<!-- | |
Typekit needs to happen inside the HEAD, but below CSS, else we get the FOUT | |
http://www.stevesouders.com/blog/2009/10/13/font-face-and-performance/ | |
--> | |
{% block typekit %} |
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
class MyTag(TagBase): | |
def slugify(self, tag, i=None): | |
slug = slughifi(tag) | |
if i is not None: | |
slug += "_%d" % i | |
return slug | |
class Meta: | |
verbose_name = _("Tag") |
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
class LimitedAdminInlineMixin(object): | |
""" | |
InlineAdmin mixin limiting the selection of related items according to | |
criteria which can depend on the current parent object being edited. | |
A typical use case would be selecting a subset of related items from | |
other inlines, ie. images, to have some relation to other inlines. | |
Use as follows:: |
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 __future__ import with_statement | |
from fabric.api import env, run, settings, hide, local | |
from fabric.decorators import hosts, runs_once | |
import os | |
import pip | |
import sys, xmlrpclib | |
from cStringIO import StringIO | |
from distutils.version import StrictVersion, LooseVersion | |
def _find_current_version(package, index_urls=None): |
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
$ curl -kLO https://github.com/utahta/pythonbrew/raw/master/pythonbrew-install | |
$ chmod +x pythonbrew-install | |
$ ./pythonbrew-install | |
$ echo "source ~/.pythonbrew/etc/bashrc" >> .bashrc | |
$ source .bashrc | |
$ pythonbrew install -f 2.6.6 # なぜかtest_ioctlでこけたためforce | |
$ pythonbrew install -f 3.1.3 # 同上 | |
$ pythonbrew switch 2.6.6 |
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
cd ~ | |
sudo apt-get install unzip | |
sudo apt-get install python-software-properties -y | |
sudo add-apt-repository ppa:ferramroberto/java | |
sudo apt-get update | |
sudo apt-get install sun-java6-jre sun-java6-plugin -y | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.0.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz |
OlderNewer