Skip to content

Instantly share code, notes, and snippets.

Vladimir Lazarenko favoretti

Block or report user

Report or block favoretti

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@favoretti
favoretti / zimbra-letsencrypt-renew.md
Created May 8, 2018 — forked from ugurerkan/zimbra-letsencrypt-renew.md
Zimbra 8.6.0 Letsencrypt SSL renew walkthrough.
View zimbra-letsencrypt-renew.md
View keybase.md

Keybase proof

I hereby claim:

  • I am favoretti on github.
  • I am favoretti (https://keybase.io/favoretti) on keybase.
  • I have a public key whose fingerprint is 1C4E C3E7 980E 72C2 ACFE DB57 9D32 1AC6 564F 47CC

To claim this, I am signing this object:

View gist:6272899
@task
def deployComponent(filepath, config, args, fabrichelper):
def signal_handler(signal, frame):
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
View gist:5221652
#include <stdio.h>
#include <unistd.h>
int main(void) {
char host[256];
if (gethostname(host, sizeof(host)) == 0)
host[sizeof(host) - 1] = '\0';
View gist:5221431
if (gethostname(host, sizeof(host)) == 0)
host[sizeof(host) - 1] = '\0';
else
strlcpy(host, "localhost", sizeof(host));
user_info[++i] = fmt_string("host", host);
if (user_info[i] == NULL)
errorx(1, _("unable to allocate memory"));
ud->host = user_info[i] + sizeof("host=") - 1;
@favoretti
favoretti / gist:4506529
Created Jan 10, 2013
opencsw collectd SMF manifest
View gist:4506529
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='collectd'>
<service
name='application/collectd'
type='service'
version='1'>
<create_default_instance enabled='true' />
@favoretti
favoretti / gist:4506524
Created Jan 10, 2013
opencsw collectd SMF method
View gist:4506524
bash-3.2# cat /lib/svc/method/collectd
#!/sbin/sh
PIDFILE=/var/opt/csw/run/collectd.pid
DAEMON=/opt/csw/sbin/collectd
. /lib/svc/share/smf_include.sh
case "$1" in
start)
View gist:1562548
function __construct()
{
global $dataSourceName; //configuration variable, has all the information to connect to database
global $dbOpts; // configuration variable, has db operation options see config and PEAR DB module for details
global $logHandler;
global $logName;
global $logIdent;
global $logConf;
global $logLevel; //these are log configuration things. Make sure you've made your homework ;)
// mne nuzhny takie veschi
View gist:1562537
def cmpver(vA, vB):
def matchesCas(version):
return re.match("^.*\d+\.(\d{4})\.(\d+)\-(\d+)-[a-z0-9]+$", version)
if vA == vB: return 0
vA = vA.replace('-jetty-console', '')
vB = vB.replace('-jetty-console', '')
vA_Array = vA.split('-')
View gist:1562489
-(NSIndexSet *) lookupAll: (NSString *) theName
{
NSIndexSet *result = [book indexOfObjectsPassingTest:
^(id obj, NSUInteger idx, BOOL *stop)
{
if ([[obj name] caseInsensitiveCompare: theName] ==
NSOrderedSame)
return YES; // found a match, keep going
else
return NO; // keep looking
You can’t perform that action at this time.