Skip to content

Instantly share code, notes, and snippets.

Avatar

dimkalinux dimkalinux

  • Ukraine
View GitHub Profile
@dimkalinux
dimkalinux / menu.sh
Last active Jul 6, 2019
User menu file for Midnight Commander
View menu.sh
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
View perl_regexp.pl
perl -pe 's/.*<Id>(.*)<\/Id>/$1/g' < ceebo.id.txt > ceebo.id2.txt
@dimkalinux
dimkalinux / adblock.txt
Last active Dec 11, 2015
My adblock rules.
View adblock.txt
###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 Jan 13, 2013
My adblock rules.
View adblock.txt
###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.
View array_map.php
<?php
$categoriesNames = array();
foreach ($categories as $categoryName) {
$categoriesNames[] = trim((string)$categoryName);
}
// так же лучше?
$categoriesNames = array_map("trim", $categories);
View gist:3618359
foreach ($book->getIsbns() as $isbn) {
doctrine()->remove($isbn);
}
$book->getIsbns()->clear();
doctrine()->flush();
View .hgrc
[extensions]
color =
graphlog =
pager =
bookmarks =
[color]
status.modified = magenta bold
status.added = green bold
status.removed = red bold
@dimkalinux
dimkalinux / ParseISO8601.js
Created Dec 14, 2011
javascript to parse ISO-8601 date format
View ParseISO8601.js
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 Nov 21, 2011
PunBB template changes between 1.3.6 and 1.4
View template_changes_1.3.6-1.4.patch
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 Aug 15, 2011
Updated flash with workaround for register_globals = 1
View flash_messenger.php
<?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
*/
You can’t perform that action at this time.