This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo -n 'the_password' | md5sum - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find . -type f -name "*.php" -exec recode iso-8859-1..utf-8 '{}' \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//open links with '#_blank' anchor in a new page | |
function addBlankTargetForLinks () { | |
$('a[href^="http"],a[href*="#_blank"]').each(function(){ | |
$(this).attr('target', '_blank'); | |
}); | |
} | |
$(document).bind('DOMNodeInserted', function(event) { | |
addBlankTargetForLinks(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem Disable/Enable windows server 2008 firewall | |
if [%1]==[] goto usage | |
netsh firewall set opmode %1 | |
goto :eof | |
:usage | |
@echo firewall-state [enable|disable] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Finding unique CSS colors with grep and perl | |
#Just a tiny one-liner I’ve found useful to get unique CSS color values in a style sheet: | |
#source: http://www.itopen.it/2012/02/14/finding-unique-css-values-with-grep-and-perl/ | |
#------------------ | |
egrep -r '#[a-fA-F0-9]{3,6}+(\s|;)' *.css|perl -ne 'if (m/(#[a-fA-F0-9]{3,6}+)(\s|;)/){print "$1\n";}'|sort|uniq |
NewerOlder