Skip to content

Instantly share code, notes, and snippets.

@Q0
Q0 / userChrome.css
Created August 22, 2020 10:32
sidebery.css
/* Hide Tab Toolbar */
:root{
--uc-window-control-width: 138px; /* Space reserved for window controls */
--uc-window-drag-space-width: 4px; /* Extra space reserved on both sides of the nav-bar to be able to drag the window */
--uc-toolbar-height: 32px;
}
#nav-bar::before,
#nav-bar::after{
@Q0
Q0 / replace.php
Created February 26, 2020 06:08
Заменяет все строки в шаблоне CodeIgniter для поддержки PO файлов
<?php
$path = realpath(__DIR__ . '/application/views/'); //
$fileList = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path), \RecursiveIteratorIterator::SELF_FIRST);
foreach ($fileList as $item) {
if ($item->isFile() && stripos($item->getPathName(), 'php') !== false) {
$file_contents = file_get_contents($item->getPathName());
$file_contents = preg_replace_callback('/<\?php echo \$this->lang->line\(\'(.*)\'\);\?>/m', function($matches) use (&$replacements) {
$pathLang = realpath(__DIR__ . '/application/language/russian/'); //
@Q0
Q0 / userChrome.css
Last active June 24, 2020 13:31
Tree Style Tab
/* Hide Tab Toolbar */
:root{
--uc-window-control-width: 138px; /* Space reserved for window controls */
--uc-window-drag-space-width: 4px; /* Extra space reserved on both sides of the nav-bar to be able to drag the window */
--uc-toolbar-height: 32px;
}
#nav-bar::before,
#nav-bar::after{
<?php
class XORFUNC
{
public static function XOR_encrypt($message, $key)
{
$ml = strlen($message);
$kl = strlen($key);
$newmsg = "";
for ($i = 0; $i < $ml; $i++) {
$newmsg = $newmsg . ($message[$i] ^ $key[$i % $kl]);