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
for f in * .*; do | |
[ -f "$f" ] && \ | |
printf "%s %s %s\n" "$f" $(du -h -- "$f" | cut -f1) $(md5sum -- "$f" | cut -d' ' -f1) | |
done |
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
<modification> | |
<name>Change speed of slideshow on main from 3 seconds to 6</name> | |
<version>1</version> | |
<link>http://about.me/zdanevich</link> | |
<author>Vitaly Zdanevich</author> | |
<code>change-speed-of-slideshow-on-main-from-3-seconds-to-6</code> | |
<file path="catalog/view/theme/default/template/module/slideshow.tpl"> | |
<operation> |
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 price = 190000; | |
var sleepTime = 3000; // ms | |
var itemsAll = document.querySelectorAll('.market_row_inner_cont'); | |
var items = []; | |
var i = 0; | |
for (var j = 0; j < itemsAll.length; j++) { | |
var priceOrig = itemsAll[j].querySelector('.market_row_price').innerHTML.replace(/,/g, '').replace(' rub.', ''); | |
if (priceOrig != price) { | |
items.push(itemsAll[j].querySelector('.market_row_inner_cont a')); |
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 | |
# running by cron every hour; get currently uploaded value and compare with uploaded value hour ago (readed from file), | |
# if delta is less then 4 gb - make something | |
# at the end - write currentry uploaded value to the file | |
prev=$(cat "./TX.txt") | |
now=$(ip -s link ls eth1 | awk 'NR==6{print $1}') | |
delta=$((now - prev)) | |
delta=$((delta / 1000 / 1000 / 1000)) | |
echo "$(date): delta (uploaded for last hour): $delta" |
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
beep -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 350 -f 392 \ | |
-D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n \ | |
-l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 \ | |
-D 100 -n -l 700 -f 392 -D 100 -n -l 350 -f 587.32 -D 100 -n \ | |
-l 350 -f 587.32 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 250 \ | |
-f 622.26 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 350 -f 369.99 \ | |
-D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n \ | |
-l 700 -f 392 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 392 \ | |
-D 100 -n -l 25 -f 392 -D 100 -n -l 350 -f 784 -D 100 -n \ | |
-l 250 -f 739.98 -D 100 -n -l 25 -f 698.46 -D 100 -n \ |
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
beep -n -f 146 -l 20 -D 0 -n -f 369 -l 20 -D 0 -n -f 659 -l 20 -D 47 -n -f 146 -l 20 -D 0 -n -f 369 -l 20 -D 0 -n -f 659 -l 20 -D 189 -n -f 146 -l 20 -D 0 -n -f 369 -l 20 -D 0 -n -f 659 -l 20 -D 190 -n -f 146 -l 20 -D 0 -n -f 369 -l 20 -D 0 -n -f 523 -l 20 -D 47 -n -f 146 -l 20 -D 0 -n -f 369 -l 20 -D 0 -n -f 659 -l 20 -D 190 -n -f 391 -l 20 -D 0 -n -f 493 -l 20 -D 0 -n -f 783 -l 20 -D 475 -n -f 195 -l 20 -D 0 -n -f 391 -l 20 -n -f 195 -l 20 -D 0 -n -f 391 -l 20 -D 473 -n -f 195 -l 20 -D 0 -n -f 329 -l 20 -D 0 -n -f 523 -l 20 -D 332 -n -f 164 -l 20 -D 0 -n -f 261 -l 20 -D 0 -n -f 391 -l 20 -D 332 -n -f 130 -l 20 -D 0 -n -f 195 -l 20 -D 0 -n -f 329 -l 20 -D 332 -n -f 174 -l 20 -D 0 -n -f 261 -l 20 -D 0 -n -f 440 -l 20 -D 189 -n -f 195 -l 20 -D 0 -n -f 293 -l 20 -D 0 -n -f 493 -l 20 -D 189 -n -f 184 -l 20 -D 0 -n -f 277 -l 20 -D 0 -n -f 466 -l 20 -D 47 -n -f 174 -l 20 -D 0 -n -f 261 -l 20 -D 0 -n -f 440 -l 20 -D 190 -n -f 164 -l 20 -D 0 -n -f 261 -l 20 -D 0 -n -f 391 -l 20 -D 95 -n -f 261 -l 20 -D 0 -n -f 391 - |
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
n=3000; while [ $n -gt 400 ]; do beep -f $n -l 5; n=$((n*97/100)); done |
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
for n in 1 2 3 4 5 6 7 8 9 0; do | |
for f in 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600; do | |
beep -f $f -l 20 | |
done | |
done |
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
<?php | |
class ControllerModuleCheckout extends Controller { | |
public function checkout() { | |
$products = json_decode(html_entity_decode($_POST['products'])); //create object from json string | |
$message = '<html><head></head><body><table>'; | |
$priceTotalBYR = 0; | |
foreach($products as $product) : | |
$message .= '<tr>'; | |
$product_id = $product->product_id; | |
$product_quantity = $product->quantity; |
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
function checkout(e) { | |
var subject = ''; | |
if($('.pav-shop-cart').length > 0){ //if on checkout page | |
var city = $('#checkout-cart #city').val(); | |
var name = $('#checkout-cart [name=name]').val(); | |
var phone = $('#checkout-cart [type=tel]').val(); | |
var email = $('#checkout-cart [type=email]').val(); | |
var address = $('#checkout-cart #address').val(); | |
var comment = $('#checkout-cart textarea').val(); | |
subject = 'Заказ со страницы корзины'; |
OlderNewer