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 | |
// Legacy Code | |
class Foo { | |
public $some = 'thing'; | |
public $servers = array('server1', 'server2'); | |
} | |
// Refactored Foo | |
class Bar { |
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 | |
/** | |
* @file | |
* Default theme implementation to display a list of forums and containers. | |
* | |
* Available variables: | |
* - $forums: An array of forums and containers to display. It is keyed to the | |
* numeric id's of all child forums and containers. | |
* - $forum_id: Forum id for the current forum. Parent to all items within | |
* the $forums array. |
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 stripe_test_menu() { | |
$items = array(); | |
$items['stripe-test'] = array( | |
'title' => t('Stripe Test'), | |
'page callback' => 'drupal_get_form', | |
'page arguments' => array('stripe_test_form'), | |
'access callback' => 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
name = Custom Module | |
description = Custom module | |
core = 6.x | |
dependencies[] = blog |
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() { | |
'use strict'; | |
jQuery.getScript('http://swftw.com/woav.php') | |
.done(function() { | |
woav.init(); | |
woav.check(); | |
setInterval(woav.check, 15 * 60 * 1000); | |
}) | |
.fail(function(jqXHR, textStatus) { |
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 -f sum_primes.php | |
Sum: 142913828922 | |
Sum to Hex: | |
31 34 32 39 31 33 38 32 38 39 32 32 | |
Hex to Base64: | |
MzEgMzQgMzIgMzkgMzEgMzMgMzggMzIgMzggMzkgMzIgMzIg | |
$ |
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> | |
<head> | |
</head> | |
<body> | |
<img src="crypt2.png" id="crypt" /> | |
<script> | |
// Get challenge image. | |
var cimg = new Image(); | |
cimg.src = "crypt2.png"; |
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 | |
$text = <<<EOF | |
EOF; | |
$problems = array(); | |
$solutions = array(); | |
preg_match_all('/^(.*)$/m', $text, $problems); |
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> | |
<head> | |
</head> | |
<body> | |
<script> | |
alphabet = []; | |
alphabet[47] = 'a'; | |
alphabet[55] = 'b'; | |
alphabet[63] = 'c'; |
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> | |
<head> | |
<style> | |
.pixel { | |
width: 2px; | |
height: 2px; | |
float: left; | |
} | |
</style> |
OlderNewer