Skip to content

Instantly share code, notes, and snippets.

View kidker's full-sized avatar
🎯
Focusing

kidker kidker

🎯
Focusing
View GitHub Profile
@kidker
kidker / facebook_leads.md
Created July 22, 2018 12:43 — forked from tixastronauta/facebook_leads.md
Receiving Facebook Leads on a Webhook

Receiving Facebook Leads on a Webhook

1 - Create an App

Head over to developer.facebook.com and create an App

2 - Setup the webhook

On your server, create a facebook webhook that will handle facebook calls. Then create a "leadgen" webhook on you App: https://developers.facebook.com/docs/graph-api/webhooks/v2.5

@kidker
kidker / gist:b1ea8b6b8dafceff271c3ff244ae8340
Last active December 10, 2024 09:22
ffmpeg mp3 to wav for asterisk
ffmpeg -i Michael_Jackson_–_Bad.mp3 -ar 8000 -ac 1 -ab 64 out_2.wav
@kidker
kidker / php
Last active October 17, 2018 16:04
Google AdWords get ClientCustomerId
<?php
namespace App\Libraries;
use Google\AdsApi\AdWords\AdWordsServices;
use Google\AdsApi\AdWords\AdWordsSession;
use Google\AdsApi\AdWords\AdWordsSessionBuilder;
use Google\AdsApi\AdWords\Reporting\v201710\DownloadFormat;
use Google\AdsApi\AdWords\Reporting\v201710\ReportDefinition;
use Google\AdsApi\AdWords\Reporting\v201710\ReportDefinitionDateRangeType;
@kidker
kidker / tsv-to-json.js
Created January 8, 2018 01:53 — forked from iwek/tsv-to-json.js
TSV to JSON Conversion in JavaScript
//var tsv is the TSV file with headers
function tsvJSON(tsv){
var lines=tsv.split("\n");
var result = [];
var headers=lines[0].split("\t");
for(var i=1;i<lines.length;i++){
@kidker
kidker / javascript
Created January 1, 2018 00:09
JS GUID V4
function guid() {
function s4() {
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
s4() + '-' + s4() + s4() + s4();
}
@kidker
kidker / jsonp.js
Created November 23, 2017 12:44 — forked from sobstel/jsonp.js
$jsonp
var $jsonp = (function(){
var that = {};
that.send = function(src, options) {
var callback_name = options.callbackName || 'callback',
on_success = options.onSuccess || function(){},
on_timeout = options.onTimeout || function(){},
timeout = options.timeout || 10; // sec
var timeout_trigger = window.setTimeout(function(){
@kidker
kidker / ffmpeg wav -> mp3
Created November 17, 2017 12:29 — forked from dominicthomas/ffmpeg wav -> mp3
Convert a wav to a 320k mp3 using ffmpeg.
ffmpeg -i inputfile.wav -ab 320k outputfile.mp3
function sendFormByEmail(e)
{
// Remember to replace this email address with your own email address
var email = "[email protected]";
var subject = "Hello Form";
var message = "";
var form = FormApp.getActiveForm();
var formResponses = form.getResponses();
@kidker
kidker / SIPml5-minimal.js
Created October 9, 2017 00:17
SIPml5: MINIMAL VERSION FOR UNDERSTAND (09.10.2017)
var globalSIPml = {
sipStack: {},
config: {},
can_call: false,
//SESSION
sipStackSessionEventsListener: function (e) {
console.info('sipStackSessionEvent: ' + e.type);
var self = this;
if (e.type == 'connected' && e.session == self.registerSession) {
console.log('соединение установлено');
@kidker
kidker / mime_types.txt
Created September 30, 2017 12:24
MIME types
# This file maps Internet media types to unique file extension(s).
# Although created for httpd, this file is used by many software systems
# and has been placed in the public domain for unlimited redisribution.
#
# The table below contains both registered and (common) unregistered types.
# A type that has no unique extension can be ignored -- they are listed
# here to guide configurations toward known types and to make it easier to
# identify "new" types. File extensions are also commonly used to indicate
# content languages and encodings, so choose them carefully.
#