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 | |
require_once('/home/alix/_.php'); | |
ph(); | |
function Purify($html, $tags = null) | |
{ | |
$html = preg_replace('~<(script|style)[^>]*>.*?(?:</\1>|\z)~is', '', $html); | |
$html = strip_tags($html, '<' . implode('><', array_keys((array) $tags)) . '>'); |
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 php | |
<?php | |
$app = function($request) { | |
$body = <<<EOS | |
<!DOCTYPE html> | |
<html> | |
<meta charset=utf-8> | |
<title>Hello World!</title> |
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> | |
<html lang="en-GB"> | |
<head> | |
<title>iTunes slider</title> | |
<link rel="stylesheet" href="style.css" type="text/css" /> | |
<script type="text/javascript" src="js/jquery.js"></script> | |
<script type="text/javascript" src="js/slider.js"></script> | |
</head> |
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.js is SMTP server written for node.js | |
this one works with node 0.4.8 and is standalone | |
sudo node smtpd.js | |
MIT License | |
*/ |
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
var $w = function(){ | |
var $w = function(){ | |
return new $w.init; | |
} | |
$w.prototype = { | |
// add all of the methods/props you want accessible as $w().method() or $w().prop here: | |
init: function(){ | |
console.log('init called'); | |
}, |
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 | |
function Email($name, $from, $to, $subject, $message, $bcc = null, $attachments = null) | |
{ | |
ini_set('SMTP', 'localhost'); | |
ini_set('sendmail_from', $from); | |
$name = filter_var($name, FILTER_SANITIZE_STRING); | |
$from = filter_var($from, FILTER_SANITIZE_EMAIL); | |
$subject = filter_var($subject, FILTER_SANITIZE_STRING); |
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
# Install the postgres packages | |
yum install postgresql postgresql-server | |
# Configure postgresql to start automatically on boot | |
chkconfig postgresql on | |
# Stat posgresql | |
service postgresql start | |
# Switch to postgres user (required to make initial connection to postgresql with default configuration) | |
su - postgres | |
# Make initial connection to the database to test connectivity | |
psql -d template1 -U postgres |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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 | |
/* | |
letter_rearranger.class.php | |
Created by Aaron Wojnowski, 2012 | |
-- USAGE -- | |
1) Create a .txt wordlist with words separated with a newline. Example: |
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 | |
//Function for compressing the CSS as tightly as possible | |
function compress($buffer) { | |
//Remove CSS comments | |
$buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer); | |
//Remove tabs, spaces, newlines, etc. | |
$buffer = preg_replace('`\s+`', ' ', $buffer); |
OlderNewer