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 sqlalchemy import * | |
from sqlalchemy.orm import * | |
import os | |
from datetime import datetime | |
from MyProject.utils.my_models import MyTable | |
DB_HOST = 'mygeniusdomain.com' | |
DBMS = 'mysql' |
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
autoload -U compinit promptinit colors | |
compinit | |
promptinit | |
colors | |
# set completion style | |
export ZLS_COLORS=$LS_COLORS | |
zstyle ':completion:*' menu select | |
zstyle -e ':completion:*:default' list-colors 'reply=("${PREFIX:+=(#bi)($PREFIX:t)(?)*==34=34}:${(s.:.)LS_COLORS}")'; |
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
$config = array( | |
// This is a authentication source which handles admin authentication. | |
'admin' => array( | |
// The default is to use core:AdminPassword, but it can be replaced with | |
// any authentication source. | |
'core:AdminPassword', | |
), |
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 | |
$config = array ( | |
/** | |
* Setup the following parameters to match the directory of your installation. | |
* See the user manual for more details. | |
* | |
* Valid format for baseurlpath is: | |
* [(http|https)://(hostname|fqdn)[:port]]/[path/to/simplesaml/] |
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 | |
/* Redirect browser */ | |
header("Location: https://mydomain.com/simplesaml/saml2/idp/initSLO.php?RelayState=/simplesaml/logout.php"); | |
/* Make sure that code below does not get executed when we redirect. */ | |
exit; | |
?> |
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
server { | |
listen 80; | |
root /var/www/simplesamlphp/www; | |
index index.php index.html index.htm; | |
server_name localhost; | |
ssl on; | |
ssl_certificate /etc/simplesamlphp_cert/simplesamlphp.crt; |
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 paramiko | |
import sys | |
SERVERS = ['<my first ssh server ip>', '<my second ssh server ip>', '<my third ssh server ip>'] | |
USER = 'genius' | |
PASSWORD = 'mygeniuspassword' | |
class MySSHClient(): | |
def __init__(self, domains=SERVERS, username=USER, password=PASSWORD): |
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 celery import Celery | |
import time | |
app = Celery('tasks', backend='amqp', broker='amqp://guest@localhost//') | |
@app.task | |
def add(x, y): | |
result = x + y | |
if result < 10: | |
result = 'Fail' |
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
# variables common to the lms role, automatically loaded | |
# when the role is included | |
--- | |
# These are variables that default to a localhost | |
# setup and are meant to be overwritten for | |
# different environments. | |
# | |
# Variables in all caps are environment specific | |
# Lowercase variables are internal to the role |
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 _default_:443> | |
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" | |
ServerName my.domain.com:443 | |
ServerAdmin admin@my.domain.com | |
ErrorLog "C:/Program Files/Apache Software Foundation/Apache2.2/logs/error.log" | |
TransferLog "C:/Program Files/Apache Software Foundation/Apache2.2/logs/access.log" | |
SSLEngine on |
OlderNewer