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 | |
# Moodle Startup Service script v1.0 by Faraz Haider 19 August 2016 | |
# acts as startup service script for Learning Management System. | |
# USAGE: start|stop|status | |
# | |
case "$1" in | |
start) | |
echo "Starting Moodle." | |
su -c '/opt/moodle/ctlscript.sh start' user_name | |
;; |
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 { | |
index index.php index.html; | |
server_name your_server_name; | |
error_log /var/log/nginx/error.log; | |
access_log /var/log/nginx/access.log; | |
root /code; | |
location ~ \.php$ { | |
try_files $uri =404; |
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 | |
//Start of class | |
class xZip { | |
public function __construct() {} | |
public function __destruct() {} | |
public function zip($source = NULL, $destination = "./",$max_size_of_1_zip_archive) { | |
if (!$destination || trim($destination) == "") { |
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
@plot([(x-1)^3],[x,-3,3])@ | |
Differentiate \((x-1)^3\) with respect to \(x\). | |
[[input:ans1]] | |
[[validation:ans1]] |
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
<link rel="stylesheet" type="text/css" href="http://localhost/moodle/custom/jsxgraph.css" media="screen" /> | |
<script type="text/javascript" src="http://localhost/moodle/custom/jsxgraphcore.js"></script> | |
<script type="text/javascript" src="http://localhost/moodle/custom/GeonextReader.js"></script> | |
<script type="text/javascript" src="http://localhost/moodle/custom/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"> | |
MathJax.Hub.Config({ | |
tex2jax: { | |
inlineMath: [ ['$$','$$'], ['@i','@i'], ["\\(","\\)"],["\\[","\\]"] ], | |
displayMath:[ ["\\(","\\)"], ['@d','@d'], ["\\[","\\]"] ], | |
processEscapes: true | |
} |
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
//STEP 1. Import required packages | |
import java.sql.*; | |
public class JDBCTest { | |
// JDBC driver name and database URL | |
static final String JDBC_DRIVER = "com.octetstring.jdbcLdap.sql.JdbcLdapDriver"; | |
static final String DB_URL = "jdbc:ldap://192.168.56.101:389/dc=dsu,dc=edu,dc=pk"; | |
// Database credentials | |
static final String USER = "cn=Admin,ou=people,dc=dsu,dc=edu,dc=pk"; |
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/env ruby | |
require 'rubygems' | |
require 'spider' | |
require 'raspell' | |
require 'hpricot' | |
#The URL below will be used by the crawler. | |
#The bot will take this URL and run a spell check on the page that it leads to. | |
#It will also perform the spell check on sub-pages emanating from the 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
# Apache configuration file for Sympa | |
Alias /static-sympa /var/lib/sympa/static_content | |
#ScriptAlias /wws /usr/lib/cgi-bin/sympa/wwsympa.fcgi | |
#ScriptAlias /sympasoap /usr/lib/cgi-bin/sympa/sympa_soap_server.fcgi | |
ScriptAlias /wws /var/www/sympa/wwsympa.fcgi | |
ScriptAlias /sympasoap /var/www/sympa/sympa_soap_server.fcgi | |
<IfModule mod_fcgid.c> | |
IPCCommTimeout 120 | |
MaxProcessCount 2 | |
</IfModule> |
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
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) | |
biff = no | |
# appending .domain is the MUA's job. | |
append_dot_mydomain = no | |
# Uncomment the next line to generate "delayed mail" warnings | |
#delay_warning_time = 4h | |
readme_directory = no |
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 | |
# LifeRay Startup Service script v1.0 by Faraz Haider 6 May 2012 | |
# acts as startup service script for LifeRay Portal. | |
# USAGE: start|stop|status|logs | |
# | |
case "$1" in | |
start) | |
echo "Starting LifeRay Web Portal." | |
export JAVA_HOME=/opt/j2sdk/jdk1.7.0_03 | |
export JRE_HOME=/opt/j2sdk/jdk1.7.0_03/jre |
NewerOlder