Skip to content

Instantly share code, notes, and snippets.

View andrei-tofan's full-sized avatar

Andrei Tofan andrei-tofan

View GitHub Profile
@andrei-tofan
andrei-tofan / py3whois.py
Created December 9, 2016 21:20 — forked from carmaa/py3whois.py
Python 3 whois client
"""
Whois client for python
transliteration of:
http://www.opensource.apple.com/source/adv_cmds/adv_cmds-138.1/whois/whois.c
Copyright (c) 2010 Chris Wolf
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@andrei-tofan
andrei-tofan / file
Created February 18, 2017 20:32
freedom_public
{"0.6526016847863005":"-----BEGIN PGP PUBLIC KEY BLOCK-----\r\nCharset: UTF-8\r\n\r\nxv8AAABSBAAAAAATCCqGSM49AwEHAgME7YU+QsYmsEkg6xbJhz85WHgueBzy4jhn\r\nU/ZhmgrwY4Efsb6xuppuvc8h2AIBcPkjfbphRQxyH6iXMrGvA53ehs3/AAAACDxn\r\naXRodWI+wv8AAACOBBATCABA/wAAAAWCWKivSP8AAAACiwn/AAAACZAdVjBfa6D4\r\naP8AAAAFlQgJCgv/AAAABJYDAQL/AAAAApsD/wAAAAKeAQAATQoBANb9UnIIu3qm\r\n3Pm1i04AseamAaWacV9M3MNeTwqUksq1AP4n3an+bSY+EzqgVVp0qfm2jCBGK/zS\r\nZko7oZ2fEWZ53c7/AAAAVgQAAAAAEggqhkjOPQMBBwIDBAbNzPPtGqc0Sn/rPnIE\r\nwmeZY8CAzNY7PNxBOYaGf00ZdNr4HGvAuPftcQ3J+uJ797phCNz8JpFJ2aBGyxZc\r\nkB8DAQgHwv8AAABtBBgTCAAf/wAAAAWCWKivSP8AAAAJkB1WMF9roPho/wAAAAKb\r\nDAAAcKoBAIS0E7SzSmcCoVsV4SyVDEpcetK5ccCseqYRQKFPxDOSAQDZGgcmL8DF\r\nCqXORoy2woc6Se0v/Tc+HBpQ6//US2ASEg==\r\n=ZMLw\r\n-----END PGP PUBLIC KEY BLOCK-----\r\n"}
@andrei-tofan
andrei-tofan / beefree.js
Created March 1, 2017 20:58
Fetch access token from beefree api
/**
* NodeJS beefree.io integration
*/
const https = require('https');
const querystring = require('querystring');
/**
* Fetch access token from beefree api
*/
@andrei-tofan
andrei-tofan / leadbi_native_form.js
Last active May 5, 2017 11:48
LeadBI Native Form Integration
// leadbi.com
var native_formid = '3638a022-2823-4541-b31c-1856f6a72933';
// get form instance
window.$leadbi_forms.getForm(native_formid, function (err, form) {
// form data
var data = {
first_name: 'test', // optional
last_name: 'test', // optional
@andrei-tofan
andrei-tofan / ninja-forms.js
Last active June 25, 2020 09:06
Ninja Forms JavaScript Hook
var form_id = 3;
// listen to all ajax completed events
jQuery(document).ajaxComplete(function (event, jqXHR, ajaxOptions) {
// try to parse response
var data = JSON.parse(jqXHR.responseText || '{}');
// check if the ajax request is for our form
if (data.data.form_id == form_id) {
@andrei-tofan
andrei-tofan / leadbi_api.md
Last active May 5, 2017 11:47
LeadBI API access documentation

LeadBI API Access

In order to access the leadbi api you need to create a api key in the account section. After the api key is created you can make api calls using the following headers:

  • X-Access-Id - api key id
  • X-Access-Secret - api key secret

Request Example

GET /api/v1/websites
Host: app.leadbi.com
@andrei-tofan
andrei-tofan / private_area.js
Last active May 5, 2017 11:47
LeadBI user identification api
// check if $leadbi_website api is available
if(window.$leadbi_website){
// fetch user object of the current visitor
window.$leadbi_website.getCurrentUser(function (err, user) {
// call the identify api
// calling this method multiple times for the same email address will not create duplicate contacts
return user.identify({
@andrei-tofan
andrei-tofan / leadbi_signup.md
Last active May 23, 2017 12:55
LeadBI SignUp Free Trial API
@andrei-tofan
andrei-tofan / leadbi_native_forms.md
Last active May 5, 2017 11:47
LeadBI Native Forms Integration

LeadBI Native Forms Integration

LeadBI Native Forms allows you to capture data from existing website forms.

Target a specific form

To target a specific form you need to specify an html5 id associated with the form, by not specifying it leadbi will try to capture all forms from the page.

Form Attributes

  • Email - any input with the text 'email' in the name field or any input with the attribute data-leadbi-email="true"
  • Full Name - any input with the text 'full?name' in the name field or any input with the attribute data-leadbi-full-name="true"
@andrei-tofan
andrei-tofan / leadbi_email_placeholders.md
Last active May 5, 2017 11:47
LeadBI Email Automation Placeholders

LeadBI Email Automation Placeholders

Placeholders allows you to create personalized emails content and urls.

Usage

[[placeholder_name]] - will be replaced with the value of the placeholder.

Avalable Placeholders

  • [[first_name]]
  • [[last_name]]
  • [[website]]