Skip to content

Instantly share code, notes, and snippets.

View keyuls's full-sized avatar

Keyul keyuls

View GitHub Profile
/* dragging logic for nomadlist.com/dating */
/* by @levelsio */
/* MIT license */
/* <dragging logic> */
$('body').on('mousedown touchstart','.card',function(e) {
if(!currentCardUserId) return;
if($('card.match_card').is(':visible')) return;
if(typeof e.originalEvent.touches !=='undefined') {
/* touch device */
b4fae48a4eb49c27650f9f26fe591d6df3983dba186e9ff0ab6d146bc04ae1bf3860d56ce9c31d7255d6c36d0dcbe5bbdbff2045b63ab20318dd1d5c04c8e70c
@keyuls
keyuls / connect_giphy.py
Last active October 24, 2017 15:41
Connecting Giphy with Chatfuel
from flask import Flask,request
import os
from flask import make_response
import json
app = Flask(__name__)
@app.route('/getgif')
def send_gif():
query = request.args.get('userinput')
@keyuls
keyuls / response.json
Last active October 16, 2016 03:59
Response for facebook in Api.ai
{
"id": "5998472d-f321-4ad5-b365-def1f29e79c4",
"timestamp": "2016-10-16T03:32:39.977Z",
"result": {
"source": "agent",
"resolvedQuery": "bots",
"action": "getnewestpost",
"actionIncomplete": false,
"parameters": {
"cat": "bots"
@keyuls
keyuls / connection.py
Last active September 21, 2017 21:33
connecting to api.ai
from flask import Flask, request
from flask import make_response
import requests
import os
import json
app = Flask(__name__)
@app.route('/connect')
def cf_connect():