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 | |
date_default_timezone_set('Europe/London'); // Set this to your local timezone - http://www.php.net/manual/en/timezones.php | |
/** | |
* The root directory where the repos live. | |
* | |
* @var string | |
*/ | |
$root_dir = '/your/root/dir/'; |
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
/** | |
* Phone book application | |
* Usage: ./phonebook -f <database_file> or ./phonebook | |
* | |
* | |
*/ | |
#include<stdio.h> | |
#include<string.h> | |
#include<stdlib.h> |
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
/** | |
* Search and replace word application | |
* Usage: ./search_tool -f <input_filename> -s <search word> -r <replace word> -o <output_file> -h | |
* | |
* @Author: Tunde | |
*/ | |
#include<stdio.h> | |
#include<string.h> | |
#include<stdlib.h> |
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
/** | |
* @tbenjis | |
* Caesar cipher cryptography | |
* Author: tunde | |
* | |
* */ | |
import java.awt.EventQueue; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.border.EmptyBorder; |
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
/** | |
* @tbenjis | |
* Keyword substitution cryptography | |
* Author: tunde | |
* | |
* */ | |
import java.awt.EventQueue; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; |
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
/** | |
* @tbenjis | |
* Cryptigraphic Statistical analysis | |
* Author: tunde | |
* | |
* */ | |
import java.awt.EventQueue; | |
import javax.swing.JFrame; | |
import javax.swing.JOptionPane; |
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
/** | |
** Simple Queuing, blocking probability with graph | |
** Author: Tunde | |
**/ | |
import java.awt.BasicStroke; | |
import java.awt.Color; | |
import java.awt.Dimension; | |
import java.awt.FontMetrics; | |
import java.awt.Graphics; |
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
# Compute RSA encryption in python | |
# Author: Tunde | |
import random | |
import math | |
import argparse | |
import re | |
KEY_INT = 100 # we define the near max value to get its random number for key | |
def main(): |
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
RewriteEngine On | |
# If the user is asking for the fullsite, set a cookie, remove the query, and stop. | |
RewriteCond %{QUERY_STRING} ^fullsite$ | |
RewriteRule ^/?(.*)$ http://domain.com/$1? [L,CO=fullsite:yes:.domain.com] | |
# If the user is asking for the mobilesite, set a cookie, remove the query, redirect and stop. | |
RewriteCond %{QUERY_STRING} ^mobilesite$ | |
RewriteRule ^/?(.*)$ http://m.domain.com/$1? [L,CO=fullsite:no:.domain.com] |