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 | |
| # @author Mirco Babini <mirkolofioⓐgmail.com> | |
| HTML="`wget -qO- http://dlc.sun.com.edgesuite.net/netbeans/`" | |
| versions=(`echo $HTML | grep -oE '[0-9]+\.[0-9]+\.?[0-9]?+' | uniq`) | |
| echo "${versions[${#versions[@]}-1]}" |
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
| <? | |
| /** | |
| * Prints the 'wget' cmd you must run into a shell in order to direct download the mp4 track | |
| * @author Mirco Babini <mirkolofioⓐgmail.com> | |
| */ | |
| $uris = array ('http://www.mixcloud.com/a-long-track/on-mixcloud/'); | |
| $cmd = ''; | |
| foreach ($uris as $uri) { | |
| list (,,,, $filename) = explode ('/', $uri); |
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 | |
| # @author Mirco Babini <mirkolofioⓐgmail.com> | |
| LOCALV=(`dpkg -s hplip | grep 'Version'| cut -d' ' -f2| cut -d'-' -f1`) | |
| type hp-info >/dev/null 2>&1 || LOCALV=0 | |
| HTML="`wget -qO- http://sourceforge.net/api/file/index/project-id/149981/mtime/desc/limit/20/rss`" | |
| versions=(`echo $HTML | grep -oE '[0-9]+\.[0-9]+\.?[0-9]?+' | uniq`) | |
| readarray -t versions < <(for a in "${versions[@]}"; do echo "$a"; done | sort -r) | |
| REMOTEV=${versions[0]} | |
| float_test() { echo | awk 'END { exit ( !( '"$1"')); }'; } |
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
| RSS: http://www.rcp-vision.com/eclipse/eclipseMirror/technology/epp/downloads/release/release.xml | |
| get <present> tag: RELEASENAME/RELEASECODE | |
| 32b: http://www.rcp-vision.com/eclipse/eclipseMirror/technology/epp/downloads/release/kepler/R/eclipse-standard-kepler-R-linux-gtk.tar.gz | |
| 64b: http://www.rcp-vision.com/eclipse/eclipseMirror/technology/epp/downloads/release/kepler/R/eclipse-standard-kepler-R-linux-gtk-x86_64.tar.gz | |
| filepath: [..]/release/RELEASENAME/RELEASECODE/eclipse-standard-RELEASENAME-RELEASECODE-linux-gtk[-x86_64].tar.gz |
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
| javascript:var inputs = document.getElementsByTagName("input");var cbs = [];for (var i = 0; i < inputs.length; i++) { if (inputs[i].type == "checkbox") { inputs[i].click(); } } |
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
| <?php | |
| function get_topmost_parent_id ($post_id) { | |
| if ($post_id === null) | |
| $post_id = get_the_ID(); | |
| $parent_id = get_parent_id ($post_id); | |
| if ($parent_id == 0){ | |
| return $post_id; | |
| } else { | |
| return get_topmost_parent_id ($parent_id); |
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
| <? | |
| function str_keep ($needle, $haystack, $howManyTimes = 1) { | |
| while ($howManyTimes--) { | |
| if (($pos = strpos ($haystack, $needle)) === false) { | |
| return false; | |
| } | |
| $kaystack = substr ($haystack, 0, $pos); | |
| } | |
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 | |
| if [ "$#" -eq 0 ]; then | |
| echo "usage: ./git up|down|reset"; | |
| else | |
| if [ "$1" = "up" ]; then | |
| read -p "Commit description: " desc | |
| git add . && \ | |
| git add -u && \ | |
| git commit -m "$desc" && \ | |
| git push origin master |
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
| var inputs = document.getElementsByTagName("input");var cbs = [];for (var i = 0; i < inputs.length; i++) { if (inputs[i].type == "checkbox") { inputs[i].click(); } } |
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
| <? | |
| /** | |
| * Uncache files containing passwords cached by W3 Total Cache Plugin for Wordpress. | |
| * | |
| * @author Mirco Babini <[email protected]> | |
| */ | |
| // check if the plugin exists | |
| if (defined ('W3TC_CACHE_DIR')) { | |
| $dir = W3TC_CACHE_DIR; |