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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
CREATE TABLE adressen.land | |
( | |
isocode_2 character(2) not null, -- ISO 3166 ALPHA-2 | |
isocode_3 character(3) not null, -- ISO 3166 ALPHA-3 | |
name character varying not null, -- deutscher Name des Landes (international besser via ISO-Code ankoppeln!) // German name of the country | |
vorwahl integer default null, -- internationale Vorwahl // international phone code | |
null_bei_vorwahl boolean default FALSE, -- muss man die Null der Ortsvorwahl auch nach der internationalen Vorwahl wählen? // must one dial zero between international and local phone code? | |
vorwahl_lokal boolean default FALSE, -- muss man vor Ort die Vorwahl wählen? // must one dial the local phone code also locally? | |
tld character varying default NULL, -- Top Level Domain | |
kfz character varying default NULL, -- KFZ-Kennzeichen // car code |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<config> | |
<indexDefaults> | |
<useCompoundFile>false</useCompoundFile> | |
<mergeFactor>10</mergeFactor> | |
<ramBufferSizeMB>256</ramBufferSizeMB> | |
<maxFieldLength>100000000</maxFieldLength> | |
<writeLockTimeout>1000</writeLockTimeout> | |
<commitLockTimeout>10000</commitLockTimeout> | |
<lockType>native</lockType> |
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<schema name="wikipedia" version="1.2"> | |
<types> | |
<fieldType name="string" class="solr.StrField" sortMissingLast="true" omitNorms="true"/> | |
<fieldType name="int" class="solr.TrieIntField" precisionStep="0" omitNorms="true" positionIncrementGap="0"/> | |
<fieldType name="text" class="solr.TextField" positionIncrementGap="100"> | |
<analyzer type="index"> | |
<tokenizer class="solr.WhitespaceTokenizerFactory"/> | |
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="1" splitOnCaseChange="0" splitOnNumerics="0" stemEnglishPossessive="1"/> |
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
<?php | |
$a[] = array( | |
"name" => "emre", | |
"price" => 99, | |
); | |
$a[] = array( | |
"name" => "ali", | |
"price" => 15, |
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/python | |
# -*- coding: utf-8 -*- | |
import os | |
from distutils.sysconfig import get_python_lib | |
class Installer(object): | |
def __init__(self): | |
self.__controlUser() |
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 solr | |
# create a connection to a solr server | |
s = solr.SolrConnection('http://foo/bar/:8180/solr') | |
# get all documents | |
response = s.query('*:*') | |
for hit in response.results: | |
s.delete(hit['id']) | |
s.commit() |
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
<?php | |
class ProxyRouterException extends Exception {} | |
class ProxyRouter { | |
public $url; | |
public function __construct($url) { | |
$this->url = $this->_control_url($url); |
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
# [your-project/context_processors.py] | |
from django.conf import settings | |
def ssl_fix(request): | |
media_url = getattr(settings, 'MEDIA_URL') | |
if request.is_secure() == True: | |
media_url = media_url.replace("http://", "https://") | |
return { | |
"MEDIA_URL": media_url, |
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 -*- | |
import re | |
class TurkishTools(object): | |
CHAR_MAP = { | |
"to_upper": { | |
u"ı": u"I", | |
u"ö": u"Ö", |
OlderNewer