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
[kyivstar_out] | |
exten => s,1,Set(CALLERID_ORIG=${CALLERID(num)}) | |
exten => s,n,Set(CDR(userfield)=${DST_NUM}) | |
exten => s,n,NoOp(${DIALEDPEERNUMBER}) | |
exten => s,n,Log(WARNING, ${DST_NUM}) |
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 python | |
""" | |
Nagios plugin to check PostgreSQL 9 streaming replication lag. | |
Requires psycopg2 and nagiosplugin (both installable with pip/easy_install). | |
MIT licensed: | |
Copyright (c) 2010 Jacob Kaplan-Moss. All rights reserved. |
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
import trml2pdf | |
from reportlab.pdfbase import pdfmetrics | |
from reportlab.pdfbase.ttfonts import TTFont | |
enc = 'UTF-8' | |
pdfmetrics.registerFont(TTFont('DejaVuSans', 'DejaVuSans.ttf',enc)) | |
pdfmetrics.registerFont(TTFont('DejaVuSans-Bold', 'DejaVuSans-Bold.ttf',enc)) |
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 restoran.models import * | |
from django.contrib import admin | |
class DishIngredientInline(admin.StackedInline): | |
model = Dish.ingredients.through | |
extra = 1 | |
def formfield_for_foreignkey(self, db_field, request=None, **kwargs): | |
field = super(DishIngredientInline, self).formfield_for_foreignkey(db_field, request, **kwargs) |
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 django.db import models | |
from django.db import models | |
import xworkflows | |
from django_xworkflows import models as dxmodels | |
class TransitionLog(dxmodels.BaseTransitionLog): | |
# This is where we'll store the modified object |
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
root@easy-contacts:/tmp# bower install pathjs | |
root@easy-contacts:/tmp# bower list --map | |
{ | |
"jquery": { | |
"source": { | |
"main": "components/jquery/jquery.js" | |
} | |
}, | |
"pathjs": { | |
"source": {} |
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 Foo(object): | |
... def isShit(self): | |
... return True | |
... | |
>>> foo = Foo() | |
>>> print '..' if foo.isShit() else '.' | |
.. |
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
frutik@Andrews-Mac-mini ~/Downloads$ cat a.py | |
class A(object): | |
def a(self): | |
print 'I am a' | |
frutik@Andrews-Mac-mini ~/Downloads$ cat b.py | |
class A(object): | |
def a(self): | |
print 'not a' |
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
vagrant@weekblad-cms:/tmp$ cat 1.php | |
<? | |
$a = '{"a":"een ge\u00efmproviseerde vergaderruimte"}'; | |
var_dump($a, json_decode($a, true)); | |
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
var Channel = function(url, connect_callback, disconnect_callback) { | |
var url = url; | |
var connect_callback = connect_callback || function() {}; | |
var disconnect_callback = disconnect_callback || function() {}; | |
var conn; | |
return { | |
connect: function() { | |
conn = new SockJS(url); | |
conn.onopen = function () { |
OlderNewer