This file contains 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 | |
# | |
# ************************************************* | |
# chkconfig: 2345 99 99 | |
# description: notify email address on system boot. | |
# ************************************************* | |
# Installing: | |
# 1) save as /etc/rc.d/init.d/notify | |
# 2) set the desired email address in "MAILADD" variable | |
# 3) chmod a+w /etc/rc.d/init.d/notify |
This file contains 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
$ telnet mail2.hostmaster.sk 25 | |
$ openssl s_client -crlf -connect mail2.hostmaster.sk:465 |
This file contains 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 | |
wget -e robots=off -np -m $1 |
This file contains 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
if (is_dir(TEMP_PATH)) { | |
foreach (new DirectoryIterator(TEMP_PATH) as $fileInfo) { | |
if ($fileInfo->isDot()) { | |
continue; | |
} | |
if (time() - $fileInfo->getCTime() >= HOUR_IN_SECONDS) { | |
unlink($fileInfo->getRealPath()); | |
} | |
} | |
} |
This file contains 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 | |
export DISPLAY=":0.0" | |
dbus-send --session --type=method_call --print-reply --dest=org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause |
This file contains 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 | |
export DISPLAY=":0.0" | |
dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next |
This file contains 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 nodes = document.querySelectorAll('._1sm'); | |
for (var i=0; i<nodes.length; i++) | |
nodes[i].click(); |
This file contains 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
$xml = file_get_contents($_FILES['xml']['tmp_name']); | |
$xml = simplexml_load_string($xml); | |
$ns = $xml->getNameSpaces(true); | |
foreach ($xml->xpath('//lst:categoryDetail') as $categories) { | |
$ctg = $categories->children($ns['ctg']); | |
foreach ($ctg->category as $category) { | |
insert_page($category->id, $category->name, 0); | |
if (isset($category->subCategories)) { | |
insertSubcategory($category); |
This file contains 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
$attachments = get_posts( array( | |
'post_type' => 'attachment', | |
'posts_per_page' => -1, | |
'post_status' => 'any', | |
'post_parent' => get_the_ID(), | |
'exclude' => get_post_thumbnail_id(), | |
) ); |
This file contains 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
// Example: | |
Loader.load("/script/main.js"); | |
Loader.load(base_url + '/include/fancybox2/jquery.fancybox.pack.js', function() { | |
$('.fancybox').fancybox(); | |
}); | |
var Loader = { | |
load: function(src, callback) { | |
var script = document.createElement('script'), |
OlderNewer