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 DATABASE_CONFIG { | |
var $default = array( | |
'driver' => 'mysql', | |
'persistent' => false, | |
'host' => 'localhost', | |
'login' => ':user', | |
'password' => ':password', | |
'database' => ':database', |
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
<VirtualHost *:80> | |
ServerName :servername | |
ServerAlias :serveralias | |
DocumentRoot /var/www/:appname/public | |
# Possible values include: debug, info, notice, warn, error, crit, | |
LogLevel warn | |
ErrorLog /var/www/:appname/log/apache-error.log | |
CustomLog /var/www/:appname/log/apache-access.log combined |
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
SELECT p.value AS __color__, | |
'Component '||component AS __group__, | |
id AS ticket, summary, milestone, version, t.type AS type, | |
owner, status, | |
time AS created, | |
changetime AS _changetime, description AS _description, | |
reporter AS _reporter | |
FROM ticket t | |
LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' | |
WHERE status <> 'closed' |
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
[Desktop Entry] | |
Type=Service | |
ServiceTypes=KonqPopupMenu/Plugin | |
MimeType=application/pdf;application/ps; | |
Version=1.0.0 | |
Encoding=UTF-8 | |
Actions=Print | |
[Desktop Action Print] | |
Name=Print this file |
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/bash | |
mount $PWD | |
dbus="qdbus" | |
reload="/dolphin/Dolphin_1/actions/reload org.qtproject.Qt.QAction.trigger" | |
# sample | |
# qdbus org.kde.dolphin-3696 /dolphin/Dolphin_1/actions/reload org.qtproject.Qt.QAction.trigger | |
for i in $(pgrep dolphin); do | |
$($dbus "org.kde.dolphin-$i" $reload) | |
done |
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 an extract of only loggin related stuff | |
ROOT_PATH = os.path.dirname(os.path.abspath(__file__)) | |
PATH_DATA = os.path.join(ROOT_PATH, 'data') | |
PATH_LOG = os.path.join(PATH_DATA, 'logs') | |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'formatters': { |
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 | |
import json, sys, urllib2 | |
url = sys.argv[1] | |
apiKey = 'XXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
data = { | |
'longUrl' : url | |
} | |
req = urllib2.Request('https://www.googleapis.com/urlshortener/v1/url?key='+apiKey) |
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
{% extends 'layouts/backend.html' %} | |
{% load i18n %} | |
{% block body %} | |
<div class="row"> | |
<div class="col-md-6"> | |
<form id="omni-form" action="{% url 'post_list' %}" method="GET" class="form-inline" role="form"> | |
<div class="input-group"> | |
<label class="sr-only" for="omnisearch">{% trans 'Search for posts' %}</label> | |
<input type="text" name="q" class="form-control" id="omnisearch" |
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/bash | |
set -e | |
cd /tmp | |
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-2.2.tar.gz | |
tar -xzf setuptools-2.2.tar.gz | |
cd setuptools-2.2 | |
sudo jython27 setup.py install --prefix=/opt/jython27 |
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
(function ($) { | |
var cookieName = 'csrftoken'; | |
var xHeaderName = 'X-CSRFToken'; | |
var csrfSafeMethod = function (method) { | |
return /^(GET|HEAD|OPTIONS|TRACE)$/.test(method); | |
}; | |
var getCookie = function (cookie) { |
OlderNewer