Skip to content

Instantly share code, notes, and snippets.

View kidker's full-sized avatar
🎯
Focusing

kidker kidker

🎯
Focusing
View GitHub Profile
@kidker
kidker / gist:4696f63b748ab77501d32fa21abeb8c0
Created September 30, 2017 11:58 — forked from N-Porsh/gist:7766039
PHP: simple multiple file upload
<?php
$max_file_size = 5*1024*1024; //5MB
$path = "admin/upload/"; // Upload directory
//$count = 0; // nr.successfully uploaded files
$valid_formats = array("rar","zip","7z","pdf","xlsx","xls","docx","doc","txt");
$valid_formats_server = array(
"application/pdf",
"application/octet-stream",
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 / 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
@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 / 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 / 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