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 | |
if [ $# -lt 1 ]; then | |
echo "Usage: mscreen [hostname1] [hostname2] ..." | |
exit 1 | |
fi | |
TMPFILE="/tmp/mscreen-$$" | |
echo "source $HOME/.screenrc" >$TMPFILE |
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
#!/usr/bin/env python | |
""" | |
FUNCTION: Converts a CSV (tab delimited) file to an Excel xlsx file. | |
Copyright (c) 2012, Konrad Foerstner <konrad@foerstner.org> | |
Permission to use, copy, modify, and/or distribute this software for | |
any purpose with or without fee is hereby granted, provided that the | |
above copyright notice and this permission notice appear in all | |
copies. |
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
# Postfix stuff based on https://gist.github.com/jbrownsc/4694374: | |
QUEUEID (?:[A-F0-9]+|NOQUEUE) | |
EMAILADDRESSPART [a-zA-Z0-9_.+-=:]+ | |
EMAILADDRESS %{EMAILADDRESSPART:local}@%{EMAILADDRESSPART:remote} | |
RELAY (?:%{HOSTNAME:relayhost}(?:\[%{IP:relayip}\](?::[0-9]+(.[0-9]+)?)?)?) | |
POSREAL [0-9]+(.[0-9]+)? | |
DELAYS (%{POSREAL}[/]*)+ | |
DSN %{NONNEGINT}.%{NONNEGINT}.%{NONNEGINT} | |
STATUS sent|deferred|bounced|expired |
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
--- psa-monit.conf.orig 2013-09-21 15:05:09.000000000 +0200 | |
+++ psa-monit.conf 2013-09-21 15:25:48.000000000 +0200 | |
@@ -1,11 +1,18 @@ | |
# psa-monit | |
description "Plesk Watchdog Monitor service" | |
author "Parallels <info@parallels.com>" | |
-start on starting rc RUNLEVEL=[2345] | |
+start on runlevel [2345] |
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
#!/usr/bin/osascript | |
-- Launche multiple SSH session | |
-- completely rewritten but inspired by github:xgdlm/iterm2-cssh | |
on run argv | |
set serverList to argv | |
-- Print help if no servers are given |
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 dataHelper = new DataLayerHelper(dataLayer); | |
// Page type is one of: | |
// checkout: cart, billingAndShipping, customerDetails, thankYou | |
// other: homepage, article, category, productDetail, section | |
var pageType = dataHelper.get('shoptet.pageType'); | |
// On any page, you can check for content of cart. | |
// It contains pairs productCode => itemCount | |
var cart = dataHelper.get('shoptet.cart'); |
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 run {input, parameters} | |
set cmd to "vim -c startinsert" | |
if input is not in {} then | |
set myPath to POSIX path of input | |
set cmd to "vim " & quote & myPath & quote | |
end if | |
tell application "iTerm" | |
activate | |
set myTerm to (current terminal) |
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 |
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
-- 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 = |
OlderNewer