command | description |
---|---|
ctrl + a | Goto BEGINNING of command line |
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
############################## django-auth-ldap ############################## | |
if DEBUG: | |
import logging, logging.handlers | |
logfile = "/tmp/django-ldap-debug.log" | |
my_logger = logging.getLogger('django_auth_ldap') | |
my_logger.setLevel(logging.DEBUG) | |
handler = logging.handlers.RotatingFileHandler( | |
logfile, maxBytes=1024 * 500, backupCount=5) |
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
############################## django-auth-ldap ############################## | |
import ldap | |
from django_auth_ldap.config import LDAPSearch, PosixGroupType | |
# django-auth-ldap configuration starts here | |
AUTH_LDAP_SERVER_URI = "ldap://ldap.els03.loc ldap://ldap.zbw03.loc ldap://ldap.cvg03.loc" | |
#AUTH_LDAP_USER_DN_TEMPLATE = "uid=%(user)s,ou=People,o=loc" | |
# JW is in ou=Admin,o=loc so we search over o=loc to find him | |
AUTH_LDAP_USER_SEARCH = LDAPSearch("o=loc", |
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
""" | |
Query String manipulation filters | |
""" | |
import logging | |
from django import template | |
from django.http import QueryDict | |
from django.utils.translation import ugettext as _ |
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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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 966471712184cfb3b067f2ae8dad9d8e2a896cae Mon Sep 17 00:00:00 2001 | |
From: Bearice Ren <[email protected]> | |
Date: Tue, 20 Sep 2016 11:52:08 +0800 | |
Subject: [PATCH] add filter-aaaa option | |
--- | |
src/dnsmasq.h | 3 ++- | |
src/option.c | 3 +++ | |
src/rfc1035.c | 9 +++++++++ | |
3 files changed, 14 insertions(+), 1 deletion(-) |
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
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb | |
index f55e69c..b6f1ad9 100644 | |
--- a/config/initializers/1_settings.rb | |
+++ b/config/initializers/1_settings.rb | |
@@ -10,11 +10,7 @@ class Settings < Settingslogic | |
private | |
def build_gitlab_shell_ssh_path_prefix | |
- if gitlab_shell.ssh_port != 22 | |
- "ssh://#{gitlab_shell.ssh_user}@#{gitlab_shell.ssh_host}:#{gitlab_shell.ssh_port}/" |
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
#printf | |
RUN printf '#!/bin/bash\n\ | |
echo hello world from line 1\n\ | |
echo hello world from line 2'\ | |
>> /tmp/hello | |
#echo | |
RUN echo -e '#!/bin/bash\n\ | |
echo hello world from line 1\n\ | |
echo hello world from line 2'\ |
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 -*- | |
""" | |
CLI скрипт, поддерживающий две ветви параметров: | |
userdb.py append <username> <age> | |
userdb.py show <userid> | |
Заглушка предусматривает, что: | |
пользователь с именем admin уже существует | |
по userid = 1 всегда возвращается User(name='admin', age=20) |
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
* |
OlderNewer