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
document.documentElement.innerHTML = '<html><head><link rel="stylesheet" href="http://google-code-prettify.googlecode.com/svn/branches/release-1-Jun-2011/styles/sunburst.css" /></head><body><pre class="prettyprint"><!DOCTYPE html>\n<html>\n' + document.documentElement.innerHTML.replace(/[<>]/g, function(m) { return {'<':'<','>':'>'}[m]}).replace(/((ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?)/gi,'<a href="$1">$1</a>') + '\n</html></pre></body></html>'; var head= document.getElementsByTagName('head')[0];var script= document.createElement('script');script.type= 'text/javascript';script.src= 'http://css-tricks.com/examples/ViewSourceButton/prettify/prettify.js';head.appendChild(script);script.onload = function(){prettyPrint();}; |
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 | |
header('HTTP/1.1 200 OK'); | |
/** | |
* @package WordPress | |
* @var bool | |
*/ | |
define('WP_USE_THEMES', false); | |
/** Loads the WordPress Environment and Template */ | |
require('./wp-blog-header.php'); | |
$current_user = wp_get_current_user(); |
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 | |
#OpenVPN Server on CentOS OpenVZ VPS Script by Yasyf Mohamedali (http://blog.yasyf.com/2012/08/01/openvpn-server-on-a-centos-openvz-vps) | |
#Adapted from various scripts around the net, including http://www.openvz.ca/blog/2010/11/18/setup-tuntap-openvpn-server-openvz-5-minutes/ | |
#https://gist.github.com/3230440 | |
tunstate=`cat /dev/net/tun` | |
if [ "$tunstate" = "cat: /dev/net/tun: Permission denied" ] | |
then | |
clear | |
echo "Sorry, but it seems that TUN/TAP is not enabled on your VPS." | |
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
#!/bin/bash | |
show_usage() | |
{ | |
echo "Usage: rss-diff -o original -f feed -t trim" | |
exit | |
} | |
MINARGS=2 | |
case $1 in | |
"-h"|"--help") show_usage; return 1; ;; | |
esac |
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
package jwebpass; | |
import java.io.IOException; | |
import java.net.NoRouteToHostException; | |
import java.net.URL; | |
import java.net.URLConnection; | |
import java.util.ArrayList; | |
import java.util.Scanner; | |
/** |
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
package jlog; | |
import javax.swing.JDialog; | |
import javax.swing.JOptionPane; | |
/** | |
* | |
* @author yasyf | |
*/ | |
public class JLog { |
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 | |
header("Cache-Control: no-cache, must-revalidate"); | |
header('HTTP/1.1 200 OK'); | |
function wpcomplete_searchBackups($dir) { | |
global $searchnames; | |
if ($handle = opendir($dir)) { | |
while (false !== ($file = readdir($handle))) { | |
if ($file != "." && $file != ".." && $file != "index.php" && $file != 'database.sql' && $file != '.wpcmanifest' && is_file($dir.'/'.$file)) { | |
$searchnames[] = $dir.'/'.$file; |
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="icon" type="image/x-icon" href="http://cache.yasyf.com/favicon.ico" /> |
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 | |
/** {{{ http://code.activestate.com/recipes/101525/ (r1) */ | |
$ldapconfig['host'] = 'localhost'; | |
$ldapconfig['port'] = NULL; | |
$ldapconfig['basedn'] = 'dc=localhost,dc=com'; | |
$ldapconfig['authrealm'] = 'My Realm'; | |
function ldap_authenticate() { | |
global $ldapconfig; | |
global $PHP_AUTH_USER; |
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 | |
$one = rand(1,10); $two = rand(1,10); | |
define('_def_check_spam', "$one + $two ="); | |
?> | |
<input type="text" name="contact-spam-check" id="contact-spam-check" value="<?php echo _def_check_spam; ?>" onfocus="clearInput(this,'focus','<?php echo _def_check_spam; ?>')" onblur="clearInput(this,'blur','<?php echo _def_check_spam; ?>')" /> | |
<input type="hidden" name="contact-spam-answer" id="contact-spam-answer" value="<?php echo $one+$two; ?>" /> |
OlderNewer