Skip to content

Instantly share code, notes, and snippets.

Avatar

Debjit Saha dkd903

View GitHub Profile
@dkd903
dkd903 / gist:b31a920fbc7d4eec343db1358313613d
Last active Nov 11, 2017
Add target=_blank to WordPress Author Profile Bio / Description in category: http://digitizor.com/add-target-blank-author-wp/
View gist:b31a920fbc7d4eec343db1358313613d
// http://digitizor.com/add-target-blank-author-wp/
add_filter( 'get_the_author_description', 'amtf_target_blank_author_desc' );
/**
* Add target _blank to links in author description
* Drop-in fix (workaround) for: https://core.trac.wordpress.org/ticket/12056
*/
function amtf_target_blank_author_desc( $desc ) {
return str_replace( '<a', '<a target="_blank" ', $desc );
}
@dkd903
dkd903 / wrap-syntaxhighlighter-3
Last active Aug 10, 2017
Wrap code lines in SyntaxHighlighter 3
View wrap-syntaxhighlighter-3
/**
* Add this to your theme's style.css file, or put this css block in the header
*/
body .syntaxhighlighter table td.code .container textarea {
white-space: pre-wrap !important;
}
body .syntaxhighlighter .line {
white-space: pre-wrap !important;
/* Uncomment the line below and adjust its value if after double click highlight,
* the content moves, up or down. em units only
@dkd903
dkd903 / Install_Sublime_Text_3.sh
Last active Apr 6, 2018
Install Sublime Text 3 editor on Fedora Linux & Red Hat Linux - 32 Bit Edition. More at: http://digitizor.com/?p=15885
View Install_Sublime_Text_3.sh
#!/bin/sh
SHORTCUT="[Desktop Entry]
Name=Sublime Text 3
Comment=Edit text files
Exec=/usr/local/sublime-text-3/sublime_text
Icon=/usr/local/sublime-text-3/Icon/128x128/sublime_text.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"
@dkd903
dkd903 / Install_Sublime_Text_3_64.sh
Last active Dec 31, 2016
Install Sublime Text 3 editor on Fedora Linux & Red Hat Linux - 64 Bit Edition. More at: http://digitizor.com/?p=15885
View Install_Sublime_Text_3_64.sh
#!/bin/sh
SHORTCUT="[Desktop Entry]
Name=Sublime Text 3
Comment=Edit text files
Exec=/usr/local/sublime-text-3/sublime_text
Icon=/usr/local/sublime-text-3/Icon/128x128/sublime_text.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"
@dkd903
dkd903 / install-sublime-text.sh
Last active Dec 16, 2015
Install Sublime Text 2 editor on Fedora Linux & Red Hat Linux - 32 Bit Edition. More at: http://digitizor.com/?p=15476; Inspired from https://gist.github.com/henriquemoody/3288681
View install-sublime-text.sh
#!/bin/sh
SHORTCUT="[Desktop Entry]
Name=Sublime Text 2
Comment=Edit text files
Exec=/usr/local/sublime-text-2/sublime_text
Icon=/usr/local/sublime-text-2/Icon/128x128/sublime_text.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"
@dkd903
dkd903 / Font Config Fedora
Created Apr 11, 2013
Content for .fonts.conf file needed to spice up fonts in Fedora Linux or Red-Hat Linux - How To Get Ubuntu Like Crisp, Sharp Fonts In Fedora / Gnome 3? [http://digitizor.com/?p=15475]
View Font Config Fedora
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<edit mode="assign" name="autohint">
<bool>true</bool>
</edit>
</match>
<!-- Enable sub-pixel rendering -->
<match target="font">
View getusertab_config.php
<?php
$appId = "PUT UR APP ID";
$pageName = "";
$secret = "Put YOUR APP SECRET";
$pageurl = "https://www.facebook.com/digitizormedia/app_".$appId;
$baseurl = "http://digitizormedia.com/fbapps/demos/getuseridtab/";
$redirurl = $baseurl."redir.php"; //this page redirects user back to the required tab,
//after they authorize the Facebook tab app, you cannot
//specifiy the fanpage tab url directly as the redirect URL
$installappurl = "https://www.facebook.com/dialog/pagetab?app_id=".$appId."&next=".$baseurl;