Skip to content

Instantly share code, notes, and snippets.

@dimkalinux
dimkalinux / menu.sh
Last active April 4, 2024 08:53
User menu file for Midnight Commander
shell_patterns=0
+ ! t t
@ Do something on the current file
CMD=%{Enter command}
$CMD %f
+ t t
@ Do something on the tagged files
set %t; CMD=%{Enter command}
while [ -n "$1" ]; do
perl -pe 's/.*<Id>(.*)<\/Id>/$1/g' < ceebo.id.txt > ceebo.id2.txt
@dimkalinux
dimkalinux / adblock.txt
Last active December 11, 2015 01:49
My adblock rules.
###bottomads
##.fb-like
##.fb-like-box
##.fbFooterBorder
##.twitter-follow-button
##.twitter-share-button
##[title="Share on Facebook"]
##[title="Share on Twitter"]
##A[href^="http://www.facebook.com/sharer.php?"]
-tizer.
@dimkalinux
dimkalinux / adblock.txt
Created January 13, 2013 20:36
My adblock rules.
###bottomads
##.fb-like
##.fb-like-box
##.fbFooterBorder
##.twitter-follow-button
##.twitter-share-button
##[title="Share on Facebook"]
##[title="Share on Twitter"]
##A[href^="http://www.facebook.com/sharer.php?"]
-tizer.
<?php
$categoriesNames = array();
foreach ($categories as $categoryName) {
$categoriesNames[] = trim((string)$categoryName);
}
// так же лучше?
$categoriesNames = array_map("trim", $categories);
foreach ($book->getIsbns() as $isbn) {
doctrine()->remove($isbn);
}
$book->getIsbns()->clear();
doctrine()->flush();
@dimkalinux
dimkalinux / .hgrc
Created February 5, 2012 18:37
My .hgrc
[extensions]
color =
graphlog =
pager =
bookmarks =
[color]
status.modified = magenta bold
status.added = green bold
status.removed = red bold
@dimkalinux
dimkalinux / ParseISO8601.js
Created December 14, 2011 20:41
javascript to parse ISO-8601 date format
function ParseISO8601(iso)
{
// 0 = whole string
// 1 = year
// 2 = month
// 3 = day
// 4 = whole time part
// 5 = hour
// 6 = minute
// 7 = second
@dimkalinux
dimkalinux / template_changes_1.3.6-1.4.patch
Created November 21, 2011 18:04
PunBB template changes between 1.3.6 and 1.4
diff --git a/include/template/admin.tpl b/include/template/admin.tpl
index 3536d56..bb42452 100644
--- a/include/template/admin.tpl
+++ b/include/template/admin.tpl
@@ -1,12 +1,14 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" <!-- forum_local -->>
+<!DOCTYPE html>
+<!--[if lt IE 7 ]> <html class="oldie ie6" <!-- forum_local -->> <![endif]-->
@dimkalinux
dimkalinux / flash_messenger.php
Created August 15, 2011 13:09
Updated flash with workaround for register_globals = 1
<?php
/**
* Loads the flash messenger class.
*
* @copyright (C) 2008-2011 PunBB, partially based on code (C) 2008-2009 FluxBB.org
* @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
* @package PunBB
*/