News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Recent posts

#1
PasteBin / Paste-1548274170:v:use_geshi-1...
Last post by Guest - Jan 23, 2019, 08:09 PM
;<?php http_response_code(403); /*
; config file for PrivateBin
;
; An explanation of each setting can be find online at https://github.com/PrivateBin/PrivateBin/wiki/Configuration.

[main]
; (optional) set a project name to be displayed on the website
; name = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"PrivateBin\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

; enable or disable the discussion feature, defaults to true
discussion = false

; preselect the discussion feature, defaults to false
opendiscussion = false

; enable or disable the password feature, defaults to true
password = false

; enable or disable the file upload feature, defaults to false
fileupload = false

; preselect the burn-after-reading feature, defaults to false
burnafterreadingselected = false

; which display mode to preselect by default, defaults to \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"plaintext\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
; make sure the value exists in [formatter_options]
defaultformatter = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"syntaxhighlighting\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

; (optional) set a syntax highlighting theme, as found in css/prettify/
; syntaxhighlightingtheme = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"sons-of-obsidian\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

; size limit per paste or comment in bytes, defaults to 2 Mebibytes
sizelimit = 2097152

; template to include, default is \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"bootstrap\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" (tpl/bootstrap.php)
template = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"bootstrap\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

; (optional) notice to display
; notice = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Note: This is a test service: Data may be deleted anytime. Kittens will die if you abuse this service.\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

; by default PrivateBin will guess the visitors language based on the browsers
; settings. Optionally you can enable the language selection menu, which uses
; a session cookie to store the choice until the browser is closed.
languageselection = false

; set the language your installs defaults to, defaults to English
; if this is set and language selection is disabled, this will be the only language
; languagedefault = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"en\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

; (optional) URL shortener address to offer after a new paste is created
; it is suggested to only use this with self-hosted shorteners as this will leak
; the pastes encryption key
; urlshortener = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"https://shortener.example.com/api?link=\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

; (optional) Let users create a QR code for sharing the paste URL with one click.
; It works both when a new paste is created and when you view a paste.
; qrcode = true

; (optional) IP based icons are a weak mechanism to detect if a comment was from
; a different user when the same username was used in a comment. It might be
; used to get the IP of a non anonymous comment poster if the server salt is
; leaked and a SHA256 HMAC rainbow table is generated for all (relevant) IPs.
; Can be set to one these values: none / vizhash / identicon (default).
; icon = none

; Content Security Policy headers allow a website to restrict what sources are
; allowed to be accessed in its context. You need to change this if you added
; custom scripts from third-party domains to your templates, e.g. tracking
; scripts or run your site behind certain DDoS-protection services.
; Check the documentation at https://content-security-policy.com/
; Note: If you use a bootstrap theme, you can remove the allow-popups from the sandbox restrictions.
; By default this disallows to load images from third-party servers, e.g. when they are embedded in pastes. If you wish to allow that, you can adjust the policy here. See https://github.com/PrivateBin/PrivateBin/wiki/FAQ#why-does-not-it-load-embedded-images for details.
; cspheader = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"default-src \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'none\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'; manifest-src \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'self\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'; connect-src *; script-src \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'self\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'; style-src \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'self\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'; font-src \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'self\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'; img-src \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'self\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' data:; media-src data:; object-src data:; Referrer-Policy: \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'no-referrer\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'; sandbox allow-same-origin allow-scripts allow-forms allow-popups allow-modals\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

; stay compatible with PrivateBin Alpha 0.19, less secure
; if enabled will use base64.js version 1.7 instead of 2.1.9 and sha1 instead of
; sha256 in HMAC for the deletion token
zerobincompatibility = false

[expire]
; expire value that is selected per default
; make sure the value exists in [expire_options]
default = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"never\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

[expire_options]
; Set each one of these to the number of seconds in the expiration period,
; or 0 if it should never expire
5min = 300
10min = 600
1hour = 3600
1day = 86400
1week = 604800
; Well this is not *exactly* one month, it\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'s 30 days:
1month = 2592000
1year = 31536000
never = 0

[formatter_options]
; Set available formatters, their order and their labels
plaintext = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Plain Text\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
syntaxhighlighting = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Source Code\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
markdown = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Markdown\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

[traffic]
; time limit between calls from the same IP address in seconds
; Set this to 0 to disable rate limiting.
limit = 10

; (optional) if your website runs behind a reverse proxy or load balancer,
; set the HTTP header containing the visitors IP address, i.e. X_FORWARDED_FOR
; header = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"X_FORWARDED_FOR\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

; directory to store the traffic limits in
dir = PATH \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"data\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

[purge]
; minimum time limit between two purgings of expired pastes, it is only
; triggered when pastes are created
; Set this to 0 to run a purge every time a paste is created.
limit = 300

; maximum amount of expired pastes to delete in one purge
; Set this to 0 to disable purging. Set it higher, if you are running a large
; site
batchsize = 10

; directory to store the purge limit in
dir = PATH \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"data\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

[model]
; name of data model class to load and directory for storage
; the default model \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Filesystem\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" stores everything in the filesystem
class = Filesystem
[model_options]
dir = PATH \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"data\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

;[model]
; example of DB configuration for MySQL
;class = Database
;[model_options]
;dsn = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"mysql:host=localhost;dbname=privatebin;charset=UTF8\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
;tbl = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"privatebin_\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"   ; table prefix
;usr = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"privatebin\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
;pwd = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Z3r0P4ss\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
;opt[12] = true     ; PDO::ATTR_PERSISTENT

;[model]
; example of DB configuration for SQLite
;class = Database
;[model_options]
;dsn = \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"sqlite:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\" PATH \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"data/db.sq3\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"
;usr = null
;pwd = null
;opt[12] = true   ; PDO::ATTR_PERSISTENT
#2
PasteBin / Paste-1401711889:v:use_geshi-1...
Last post by Guest - Jun 02, 2014, 12:24 PM
<HTML></HTML>
#3
PasteBin / Paste-1400197654:v:use_geshi-0...
Last post by Guest - May 15, 2014, 11:47 PM
asdf<>"asdf
#4
PasteBin / Paste-1400197641:v:use_geshi-0...
Last post by Guest - May 15, 2014, 11:47 PM
asdf<>"asdf
#5
PasteBin / Paste-1393467383:v:use_geshi-1...
Last post by Guest - Feb 27, 2014, 02:16 AM
nkkjkjkhkjhjhjk
#6
PasteBin / Paste-1374353864:v:use_geshi-1...
Last post by Liam - Jul 20, 2013, 08:57 PM
debug.disableEventLog(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoTimeLeft(true)
tfm.exec.disableAutoScore(true)
tfm.exec.disableAutoShaman(true)
TICKS = 10;

local s = 1000/TICKS;
for t = 0, 1000 - s, s do
   system.newTimer(function () system.newTimer(loop, 1000, true) end, 1000 + t, false);
end

function newRound()
   tfm.exec.newGame(2876844)
   players={}
   fights={}
   spawns={}
   runes={}
   runestime={}
   runesshot={}
   canShoot={}
   fightsalive = 0
   spawnsalive = 0
end

function eventNewGame()
   for name,player in pairs(tfm.get.room.playerList) do
      table.insert(players,player)
      bindKeys(name, true)
   end
   for i=1,#players,1 do
      local index=math.random(#players)
      local player=players[index]
      if i%3==0 then
         table.insert(fights,player.playerName)
         --tfm.exec.chatMessage("<R>"..player.playerName)
         tfm.exec.movePlayer(player.playerName,1380,215)
         tfm.exec.setNameColor(player.playerName,0xc13535)
         fightsalive = fightsalive + 1
      elseif i%2==0 then
         table.insert(spawns,player.playerName)
         --tfm.exec.chatMessage("<BV>"..player.playerName)
         tfm.exec.movePlayer(player.playerName,140,345)
         tfm.exec.setNameColor(player.playerName,0x354fc1)
         canShoot[player.playerName]=true
         spawnsalive = spawnsalive + 1
      else
         table.insert(fights,player.playerName)
         --tfm.exec.chatMessage("<R>"..player.playerName)
         tfm.exec.movePlayer(player.playerName,1380,215)
         tfm.exec.setNameColor(player.playerName,0xc13535)
         fightsalive = fightsalive + 1
      end
      table.remove(players,index)
   end
end

function eventLoop(time,remaining)
   if remaining<=0 or fightsalive<=0 or spawnsalive<=0 then
      newRound()
   end
end

function loop()
   for k,v in pairs(runestime) do
      if v~=0 and (tonumber(os.time())>v+5000) then
         tfm.exec.removeObject(runes[k])
         canShoot[runesshot[k]] = true
         --runestime[v] = 0
         table.remove(runestime,k)
         table.remove(runes,k)
         table.remove(runesshot,k)
         break
      end
   end
end

function eventPlayerLeft(playerName)
   bindKeys(playerName, false)
end

function bindKeys(playerName, active)
   tfm.exec.bindKeyboard(playerName,83,active,true) -- S
   tfm.exec.bindKeyboard(playerName,40,active,true) -- DOWN
end

function eventKeyboard(playerName, key, down, x, y)
   if (key==83 or key==40) and inTable(spawns,playerName) and canShoot[playerName]==true then
      rune=tfm.exec.addShamanObject(62,x+25,y,0,0,0,true)
      table.insert(runes,rune)
      table.insert(runestime,os.time())
      table.insert(runesshot,playerName)
      canShoot[playerName]=false
   end
end

function eventPlayerDied(playerName)
   if inTable(fights,playerName) then
      fightsalive = fightsalive - 1
   end
   if inTable(spawns,playerName) then
      spawnsalive = spawnsalive - 1
   end
end

function eventPlayerWon(playerName)
   if inTable(fights,playerName) then
      fightsalive = fightsalive - 1
   end
   if inTable(spawns,playerName) then
      fightsalive = fightsalive - 1
   end
end

function tfm.exec.giveWinAll()
   for playerName,player in pairs(tfm.get.room.playerList) do
      if not player.isDead then
         tfm.exec.giveCheese(playerName)
         tfm.exec.playerVictory(playerName)
      end
   end
end

function inTable(tbl, item)
   for key, value in pairs(tbl) do
      if value == item then
         return key
      end
   end
   return false
end

newRound()
#7
PasteBin / Paste-1370422937:v:use_geshi-1...
Last post by Guest - Jun 05, 2013, 09:02 AM
<?xml version="1.0"?>

<!DOCTYPE package-info SYSTEM "http://www.simplemachines.org/xml/package-info">
-<package-info xmlns:smf="http://www.simplemachines.org/" xmlns="http://www.simplemachines.org/xml/package-info"><id>vbgamer45:ContactPage</id><name>Contact Page</name><type>modification</type><version>3.2</version>-<install for="1.1 - 1.1.99,1.1 RC3,1.1 RC2"><readme>ReadMe.txt</readme><modification type="file">contact.xml</modification><require-file destination="$sourcedir" name="Contact.php"/><require-file destination="$themedir" name="Contact.template.php"/></install>-<uninstall for="1.1 - 1.1.99,1.1 RC3,1.1 RC2"><modification type="file" reverse="true">contact.xml</modification><code>UnInstall.php</code></uninstall>-<install for="1.0 - 1.0.99"><readme>ReadMe.txt</readme><modification type="file">contact107.xml</modification><require-file destination="$sourcedir" name="Contact.php"/><require-file destination="$themedir" name="Contact.template.php"/><require-file destination="$themedir/images/english" name="contact.gif"/></install>-<uninstall for="1.0 - 1.0.99"><modification type="file" reverse="true">contact107.xml</modification><code>UnInstall.php</code></uninstall>-<install for="2.0 - 2.0.99, 2.0 RC2, 2.0 RC3, 2.0 RC4, 2.0 RC5"><readme>ReadMe.txt</readme><modification type="file">contact2.xml</modification><require-file destination="$sourcedir" name="Contact2.php"/><require-file destination="$themedir" name="Contact2.template.php"/></install>-<uninstall for="2.0 - 2.0.99, 2.0 RC2, 2.0 RC3, 2.0 RC4, 2.0 RC5"><modification type="file" reverse="true">contact2.xml</modification><code>UnInstall.php</code></uninstall></package-info>
#8
PasteBin / Paste-1329191346:v:use_geshi-1...
Last post by SleePy - Feb 14, 2012, 03:49 AM
   /**
   * Encodes an email address in multiple ways.
   * @param $str String The email address to encode.
   * @version $url_encode bool Should we use url encoding? Do not use this for displaying, only for mailto: links.
   */
   public function encode_email_address($str, $url_encode = true)
   {
      if (empty($str))
         return;

      $strlength = strlen($str);
      $ret = '';
      for($index = 0; $index < $strlength; $index++)
      {
         $type = rand(1, $url_encode ? 4 : 3);
         $char = $str[$index];
         switch($type)
         {
            case 1: $ret .= '&#' . ord($char) . ';';  break;
            case 2: $ret .= '&#x' . dechex(ord($char)) . ';'; break;
            case 3: $ret .= $char; break;
            case 4: $ret .= '%' . bin2hex($char); break;
         }
      }
      return $ret;
   }
#9
PasteBin / Paste-1329158865:v:use_geshi-1...
Last post by SleePy - Feb 13, 2012, 06:47 PM
   /**
   * Encodes an email address in multiple ways.
   * @param $str String The email address to encode.
   * @version $url_encode bool Should we use url encoding? Do not use this for displaying, only for mailto: links.
   */
   public function encode_email_address($str, $url_encode = true)
   {
      if (empty($str))
         return;

      $strlength = strlen($str);
      $ret = '';
      for($index = 0; $index < $strlength; $index++)
      {
         $type = rand(1, $url_encode ? 4 : 3);
         $char = $str[$index];
         switch($type)
         {
            case 1: $ret .= '&#' . ord($char) . ';';  break;
            case 2: $ret .= '&#x' . dechex(ord($char)) . ';'; break;
            case 3: $ret .= $char; break;
            case 4: $ret .= '%' . bin2hex($char); break;
         }
      }
      return $ret;
   }
#10
PasteBin / Paste-1327945249:v:use_geshi-1...
Last post by SleePy - Jan 30, 2012, 05:40 PM
<?php
if (isset($_SERVER['_']))
   echo shell_exec($_SERVER['_'] .' -v | head -n 1');
else
   echo `php -v | head -n 1`;
echo "\n";

$array_size = 1000;
$array_data_size = 1000;
$loops = 1000;

$data = array();

for ($i = 0; $i < $array_size; $i++)
   $data[] = str_repeat('a', $array_data_size);

$data_serialized = serialize($data);
$data_json = json_encode($data);

echo 'Array Size: ' . $array_size . "\n";
echo 'Data Size: ' . $array_data_size . "\n";
echo 'Loops to run: ' . $array_data_size . "\n";

/******** SERIALIZE *************/
echo "\nSerialize(): ";
$start = microtime(true);

for ($i = 0; $i < $loops; $i++)
   serialize($data);

$stop = microtime(true);
$diff = $stop - $start;

echo round($diff, 3) . ' (Start: ' . $stop . ' | Stop: ' . $start . ')';


/******** JSON *************/
echo "\njson_encode(): ";
$start = microtime(true);

for ($i = 0; $i < $loops; $i++)
   json_encode($data);

$stop = microtime(true);
$diff = $stop - $start;

echo round($diff, 3) . ' (Start: ' . $stop . ' | Stop: ' . $start . ')';


/******** SERIALIZE DECODE *************/
echo "\nunserialize(): ";
$start = microtime(true);

for ($i = 0; $i < $loops; $i++)
   unserialize($data_serialized);

$stop = microtime(true);
$diff = $stop - $start;

echo round($diff, 3) . ' (Start: ' . $stop . ' | Stop: ' . $start . ')';


/******** JSON DECODE *************/
echo "\njson_decode(): ";
$start = microtime(true);

for ($i = 0; $i < $loops; $i++)
   json_decode($data_json);

$stop = microtime(true);
$diff = $stop - $start;

echo round($diff, 3) . ' (Start: ' . $stop . ' | Stop: ' . $start . ')';

echo "\n\n";