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
= Hlavicka XML | |
<?xml-stylesheet href="https://beta.shoptet.cz/user/documents/katalog.xsl" type="text/xsl"?> | |
<SHOP> | |
= Tělo XML | |
<SHOPITEM> | |
<PRODUCT>#NAME#</PRODUCT> | |
<ITEM_ID>#CODE#</ITEM_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
iconv -f utf8-mac -t utf8 |
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
// ==UserScript== | |
// @name Shoptet Admin Background Color | |
// @namespace https://www.shoptet.cz/ | |
// @version 0.1 | |
// @description change bg color for admin! | |
// @author brablc | |
// @match https://beta.shoptet.cz/admin/* | |
// ==/UserScript== | |
(function() { |
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
<div id="google-tr"> | |
<div id="google_translate_element"></div> | |
<script> | |
function googleTranslateElementInit() { | |
new google.translate.TranslateElement({ | |
pageLanguage: 'cs' | |
}, 'google_translate_element'); | |
} | |
</script> | |
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> |
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 query == nil then | |
s = "users" | |
else | |
-- Remove part before @ | |
s = string.gsub( query, ".*@", "") | |
-- Remove dots from selector | |
s = string.gsub( s, "%.", "_") | |
end | |
d = "smtp.shoptet.cz" |
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
Moved to a repository: | |
https://github.com/brablc/postfix-tools |
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
-- ALTER TABLE roundcube.contacts ADD UNIQUE INDEX `uniq_email_user_id` (`email` (128), `user_id`); | |
SET @CrLf='\r\n'; | |
SET sql_mode='PIPES_AS_CONCAT'; | |
INSERT IGNORE roundcube.contacts | |
SELECT | |
NULL contact_id, | |
changed, | |
0 del, | |
IF(firstname,firstname || ' ','') || surname name, |
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 there is no "@dkim" it means we did not get X-DKIM-Sender header, but From instead. | |
if query == nil or string.find( query, "@dkim$" ) == nil then | |
query = "default=news.shoptet.cz@dkim" | |
end | |
signer = string.gsub( query, "@.*", "") | |
-- Before = | |
s = string.gsub( signer, "=.*", "") | |
-- After = |
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
-- On startup opendkim executes the script but does not give any query | |
if query == nil then | |
return "%" | |
end | |
return query |
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
$ dig adisepo.mfcr.cz | |
; <<>> DiG 9.8.3-P1 <<>> adisepo.mfcr.cz | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14083 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;adisepo.mfcr.cz. IN A |