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
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
<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 |
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/php | |
<?php | |
// Place this script in /<moodle-root-path>/course/ directory and run it | |
// * To delete one specific course with id: | |
// ~# php bulk_delete.php <course_id> | |
// | |
// * To delete all courses in the system: | |
// ~# php bulk_delete.php | |
// | |
// Tested Moodle version: |
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
ValueError: The file 'themes/ourtheme/images/bg.png' could not be found with <pipeline.storage.PipelineCachedStorage object at 0x38a18d0>. |
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() { | |
// Stick the #nav to the top of the window | |
var nav = $('#nav'); | |
var navHomeY = nav.offset().top; | |
var isFixed = false; | |
var $w = $(window); | |
$w.scroll(function() { | |
var scrollTop = $w.scrollTop(); | |
var shouldBeFixed = scrollTop > navHomeY; | |
if (shouldBeFixed && !isFixed) { |
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
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns:fb='http://www.facebook.com/2008/fbml' xmlns:og='http://opengraph.org/schema/'> <head><meta property='og:title' content='Update from {course_title}'/><meta property='fb:page_id' content='43929265776' /> <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'> <title>Update from {course_title}</title> </head> <body leftmargin='0' marginwidth='0' topmargin='0' marginheight='0' offset='0' style='margin: 0;padding: 0;background-color: #ffffff;'> <center> <table align='center' border='0' cellpadding='0' cellspacing='0' height='100%' width='100%' id='bodyTable' style='border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;margin: 0;padding: 0;background-color: #ffffff;height: 100% !important;width: 100% !important;'> <tr> <td align='center' valign='top' id='bodyCell' st |
OlderNewer