Skip to content

Instantly share code, notes, and snippets.

View datio's full-sized avatar
￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸

￸A￸l￸e￸x D￸o￸m￸a￸k￸i￸d￸i￸s datio

￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸ ￸￸
View GitHub Profile
@datio
datio / traceGL Flatland Dark theme
Created August 19, 2013 00:14
A kinda kinder on the eyes dark theme for tracegl.js, based on the sublime text 2 version of of the Flatland Dark theme.
exports.dark = {
subpx: 'vec4(75,75,75,1)', //vec4(0,0,0,1)
dlgbg: hexs('505354'), //8F8F94 :top bar background
dlghi: hexs('4d4f50'), //9996e2 :seperator sides hover
sliderbase: 'vec4(230,230,230,1)', //vec4(0,0,0,0.1)
splitter1: hexs('333333'), //333333 :seperator sides
splitter2: hexs('2e2f30'), //444444 :seperator inner
splitter3: hexs('444748'), //777777 :seperator inner active
dlgtxt: hexs('F2F2F2'), //FFFFFF :color button text
defbg2: hexs('ffffff'), //000000
@datio
datio / jscrambler.js
Last active April 14, 2018 15:54
JScrambler paywall bypass
// This was a Secret Gist that described a way to bypass the paywall of JScramler, a javascript obfuscation PaaS.
// The developer patched the logic error soon after it was reported.
// At the time of this gist update, a free and open source alternative to JScrambler exists: https://github.com/javascript-obfuscator/javascript-obfuscator/
// Usage: New Project -> Advanced Users -> $this -> select Standard Mode -> select desired transformations -> Submit
// After downloading the obfuscated project it is trivial to change the date timestamp and remove the 1-day demo limit.
// Note: This will not bypass the daily limits for the current user. However, the app does not throttle per IP.
$('input[disabled=disabled], textarea[disabled=disabled]').prop('disabled', false);
@datio
datio / Listener.php
Last active October 21, 2018 04:12
All the available Event Listeners for XenForo 2.0.10
<?php
namespace Datio\ActionLogAndLimit;
class Listeners
{
public static function addonPostInstallListener(
\XF\AddOn\AddOn $addOn,
\XF\Entity\AddOn $installedAddOn,
array $json,
package main
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"regexp"
"sort"
"strings"
<?php
// RewriteCond %{REQUEST_URI} forum/local_links.php
// RewriteRule ^.*$ vbdm2xf.php [NC,L]
$startTime = microtime(true);
$fileDir = '/var/www/html';
require($fileDir . '/library/XenForo/Autoloader.php');
XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');
@datio
datio / Dockerfile
Last active June 10, 2018 19:10
XF2 Docker Container: Dockerfile for XenForo2 with Xdebug
FROM php:apache
RUN apt update && apt upgrade -y && apt-get autoremove -y \
&& apt install -y libfreetype6-dev && apt install -y libpng-dev \
&& apt install -y libjpeg62-turbo-dev && apt install -y libxml2-dev \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd && docker-php-ext-install mysqli && docker-php-ext-install zip && docker-php-ext-install xml \
&& a2enmod rewrite \
&& yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
@datio
datio / UserLogin.php
Created August 6, 2018 12:56
XF2 SSO: XenForo 2 Single Sign On session cookie set up
<?php
namespace Datio\WeightixCli\Cli\Command\Misc;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
class UserLogin extends Command
@datio
datio / get_authenticated_cookie.php
Last active August 25, 2018 06:17
Create a logged in session programmatically in XF2
@datio
datio / commands.sql
Created October 4, 2018 03:08
XenForo 2 make all users' primary group the registered group
UPDATE xf_user
SET secondary_group_ids = CONCAT(user_group_id, ',', secondary_group_ids)
WHERE LENGTH(secondary_group_ids) > 0
AND user_group_id <> 2;
UPDATE xf_user
SET secondary_group_ids = user_group_id
WHERE secondary_group_ids = ''
AND user_group_id <> 2;

Keybase proof

I hereby claim:

  • I am datio on github.
  • I am datio (https://keybase.io/datio) on keybase.
  • I have a public key ASAHBbxlPM2Cn5Vmq8Tn2cmr9-_73jw3u-s2U6MRprVuUQo

To claim this, I am signing this object: