Skip to content

Instantly share code, notes, and snippets.

View chopachom's full-sized avatar

Alexander Petrovich chopachom

View GitHub Profile
=erl_crash_dump:0.1
Mon Jan 28 16:40:23 2013
Slogan: Kernel pid terminated (application_controller) ({application_terminated,os_mon,shutdown})
System version: Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:64] [kernel-poll:true]
Compiled: Mon Sep 10 14:11:25 2012
Taints: crypto,bitcask_nifs,dyntrace
Atoms: 15582
=memory
total: 16167800
processes: 1122640
# -*- coding: utf-8 -*-
import types
from mongoengine import EmbeddedDocument, EmbeddedDocumentField, ListField
class Resource(object):
#: :type Document: :class:`mongoengine.Document`
@chopachom
chopachom / proxy.go
Created July 26, 2012 13:18 — forked from vmihailenco/proxy.go
Simple TCP proxy in Golang
package main
import (
"encoding/hex"
"flag"
"fmt"
"log"
"net"
)
@chopachom
chopachom / gist:2484723
Created April 24, 2012 23:54
ModelMultipleCommaField
class ModelMultipleCommaField(forms.ModelMultipleChoiceField):
widget = forms.TextInput
def __init__(self, queryset, db_lookup_field='pk', *args, **kwargs):
super(ModelMultipleCommaField, self).__init__(queryset, *args, **kwargs)
self.db_lookup_field = db_lookup_field
def clean(self,value):
if self.required and not value:
@chopachom
chopachom / Japanese style
Created February 10, 2012 17:16 — forked from endolith/Has weird right-to-left characters.txt
Unicode smileys emoticons
¯\_(⊙︿⊙)_/¯
⨀_⨀
⨂_⨂
(/◔ ◡ ◔)/
°ﺑ°
(¬_¬)
(´・ω・`)
(ʘ_ʘ)
(ʘ‿ʘ)
(๏̯͡๏ )
@chopachom
chopachom / cors-nginx.conf
Created January 4, 2012 15:58 — forked from michiel/cors-nginx.conf
Wide-open CORS config for nginx
#
# Wide-open CORS config for nginx
#
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' 'http://10.140.10.40';
#
diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
index a0e2176..af9b81c 100644
--- a/nova/virt/libvirt/connection.py
+++ b/nova/virt/libvirt/connection.py
@@ -997,6 +997,8 @@ class LibvirtConnection(driver.ComputeDriver):
# This could be a windows image, or a vmdk format disk
LOG.warn(_('instance %(inst_name)s: ignoring error injecting'
' data into image %(img_id)s (%(e)s)') % locals())
+ import traceback
+ LOG.debug(traceback.format_exc())
# Retreive the patch file and name it idn.patch
...
# Download the archive from ruby forge of Ruby IDN
$ wget http://rubyforge.org/frs/download.php/8555/idn-0.0.2.tar.gz
# Extract the archive
$ tar -zxvf idn-0.0.2.tar.gz
x idn-0.0.2/
x idn-0.0.2/README