Doesn't exist, but according to rc.local it's ok to create & use it :)
/etc/rc.d/rc.local_shutdown
Sonntag, 11. Dezember 2011
Chrome 15 from Slackbuild.org
Install libevent:
http://slackbuilds.org/repository/13.37/libraries/libevent/
then chromium:
http://slackbuilds.org/repository/13.37/network/chromium/
http://slackbuilds.org/repository/13.37/libraries/libevent/
then chromium:
http://slackbuilds.org/repository/13.37/network/chromium/
Customize XFCE4 Menu
http://wiki.xfce.org/howto/customize-menu
Desktop files are located here: /usr/local/share/applications | /usr/share/applications/
Desktop files are located here: /usr/local/share/applications | /usr/share/applications/
Mittwoch, 7. Dezember 2011
Copy files recursively without keeping directory structure (Linux)
We had to copy many files that were located in a very complex directory structure. The following snippet searches the current directory and its subdirectories for *.xml files & executes the cp command on every file it finds (the braces {} represent the file):
find -type f -iname '*.xml' -exec cp {} /target/dir/for/all/xmls/ \;
The target dir now contains all *.xml files without directories.
find -type f -iname '*.xml' -exec cp {} /target/dir/for/all/xmls/ \;
The target dir now contains all *.xml files without directories.
All Methods from a Javascript Object
I wrote that little helper because webdeveloper toolbar didn't show all methods to me. Maybe it's useful for you too.
https://gist.github.com/1441816
https://gist.github.com/1441816
Donnerstag, 1. Dezember 2011
console.log & debug flag?
Instead of checking the DEBUG flag everytime you need a debug info, like this:
if (DEBUG) {
console.log("my debug output");
}
you can just check the DEBUG flag once and disable the console.log function, like this:
if (DEBUG === false) {
console = {
log: function() {}
};
}
This enables you to simply call:
console.log("my debug output")
in your application. If DEBUG is true, you'll get your output. If DEBUG is false, console.log() will be called but is an empty function and thus will produce no output / error.
if (DEBUG) {
console.log("my debug output");
}
you can just check the DEBUG flag once and disable the console.log function, like this:
if (DEBUG === false) {
console = {
log: function() {}
};
}
This enables you to simply call:
console.log("my debug output")
in your application. If DEBUG is true, you'll get your output. If DEBUG is false, console.log() will be called but is an empty function and thus will produce no output / error.
Abonnieren
Posts (Atom)