Skip to content

Instantly share code, notes, and snippets.

View azec-pdx's full-sized avatar
👋
Always available ...

Amer Zec azec-pdx

👋
Always available ...
View GitHub Profile
@azec-pdx
azec-pdx / blastRefresh.js
Created January 6, 2016 00:27
CRM refresh form and alert when field changed
var originalBlastStatus = null;
function SaveAndRefresh() {
//Xrm.Page.getAttribute("myAttributeName").setValue(null);
//Xrm.Page.data.refresh(true);
originalBlastStatus = Xrm.Page.getAttribute("new_campaign_status").getText();
checkStatusChanged();
}
var checkStatusChanged = function () {
@azec-pdx
azec-pdx / RapidgatorPremiumNotifier.py
Last active October 10, 2015 01:53
Python cron script for e-mail notifications about Rappidgator Premium accounts on Reddit...
#!/usr/bin/env python
__author__ = 'amerzec'
"""
This script checks Reddit updates of Premium Rapidgator accounts
and sends e-mail notification with new link where you can get those accounts.
It is based on:
1. Parsing URL: https://www.reddit.com/r/rapidgator/
2. Sending e-mail with SendGrid account
@azec-pdx
azec-pdx / anp-payload.xml
Created June 2, 2015 08:34
APIC REST API Lab (payload for creating app network profile in 3-tier application creation section)
<fvTenant name="TestCorp-10" status="created,modified">
<fvCtx name="TestCorp-Router"/>
<fvBD name="BD1">
<fvRsCtx tnFvCtxName="TestCorp-Router"/>
<fvSubnet ip="10.0.0.1/24" scope="public"/>
<fvSubnet ip="20.0.0.1/24" scope="public"/>
<fvSubnet ip="30.0.0.1/24" scope="public"/>
<fvSubnet ip="40.0.0.1/24" scope="public"/></fvBD>
<fvAp name="3-TierApp">
<fvAEPg name="Client">
@azec-pdx
azec-pdx / anp-payload.xml
Created June 2, 2015 08:31
APIC REST API Lab (payload for creating ANP in 3-tier application creation section)
<fvTenant name="TestCorp-10" status="created,modified">
<fvCtx name="TestCorp-Router"/>
<fvBD name="BD1">
<fvRsCtx tnFvCtxName="TestCorp-Router"/>
<fvSubnet ip="10.0.0.1/24" scope="public"/>
<fvSubnet ip="20.0.0.1/24" scope="public"/>
<fvSubnet ip="30.0.0.1/24" scope="public"/>
<fvSubnet ip="40.0.0.1/24" scope="public"/></fvBD>
<fvAp name="3-TierApp">
@azec-pdx
azec-pdx / anp-payload.xml
Created June 2, 2015 08:20
APIC REST API Lab (payload for creating app network profile in 3-tier application creation section)
<fvTenant name="TestCorp-10" status="created,modified">
<fvCtx name="TestCorp-Router"/>
<fvBD name="BD1">
<fvRsCtx tnFvCtxName="TestCorp-Router"/>
<fvSubnet ip="10.0.0.1/24" scope="public"/>
<fvSubnet ip="20.0.0.1/24" scope="public"/>
<fvSubnet ip="30.0.0.1/24" scope="public"/>
<fvSubnet ip="40.0.0.1/24" scope="public"/></fvBD>
<fvAp name="3-TierApp">
@azec-pdx
azec-pdx / contracts-payload.xml
Created June 2, 2015 08:14
APIC REST API Lab (payload for creating contracts in 3-tier application creation section)
<fvTenant name="TestCorp-10" status="created,modified">
<vzBrCP name="WebCt">
<vzSubj name="Web">
<vzRsSubjFiltAtt tnVzFilterName="http"/>
</vzSubj>
</vzBrCP>
<vzBrCP name="AppCt">
<vzSubj name="RMI">
<vzRsSubjFiltAtt tnVzFilterName="rmi"/>
</vzSubj>
@azec-pdx
azec-pdx / filters.xml
Created June 2, 2015 08:02
APIC REST API Lab (payload for creating filters in 3-tier application creation section)
<fvTenant name="TestCorp-10" status="created,modified">
<vzFilter name="http">
<vzEntry dFromPort="80" dToPort="80" etherT="ip" name="DPort-80" prot="tcp"/>
</vzFilter>
<vzFilter name="rmi">
<vzEntry dFromPort="1514" dToPort="1514" etherT="ip" name="DPort-1514" prot="tcp"/>
</vzFilter>
<vzFilter name="sql">
<vzEntry dFromPort="1433" dToPort="1433" etherT="ip" name="DPort-1433" prot="tcp"/>
</vzFilter>
@azec-pdx
azec-pdx / talker.c
Created March 30, 2015 11:59
Socket vježba (UDP)
/*
** talker.c -- a datagram "client" demo
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
@azec-pdx
azec-pdx / listener.c
Created March 30, 2015 11:55
Socket vježba (UDP)
/*
** listener.c -- a datagram sockets "server" demo
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
@azec-pdx
azec-pdx / client.c
Created March 30, 2015 11:44
Socket vježba (primjer klijent koda)
/*
** client.c -- a stream socket client demo
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <netdb.h>
#include <sys/types.h>