Skip to content

Instantly share code, notes, and snippets.

View David-Melo's full-sized avatar
🖥️
Coding Towards The Singularity

David Melo David-Melo

🖥️
Coding Towards The Singularity
View GitHub Profile
@David-Melo
David-Melo / overmind-graphql-effects.ts
Last active October 15, 2021 09:08
Overmind GraphQL Effects
import { graphql } from 'overmind-graphql';
import { SubscriptionClient } from 'subscriptions-transport-ws';
// Query & Mutation GQL Tags
import * as queries from './queries';
import * as mutations from './mutations';
// Subscription GQL Tags
import { UsersUpdatedQuery } from './generated/api';
@David-Melo
David-Melo / feathers-express-multipart.js
Created June 22, 2018 14:42
Feathers.js/Express.js Multi-Part Upload Handler
const BlobService = require('feathers-blob');
const fs = require('fs-blob-store');
const multer = require('multer');
const multipartMiddleware = multer();
const { getBase64DataURI } = require('dauria');
const blobStorage = fs(__dirname + '/uploads');
module.exports = function (app) {
{
"moderation_response": {
"result_code": 0,
"result": "Clean",
"engine_results": [
[
null
],
[
null
@David-Melo
David-Melo / sample_call_data
Created November 5, 2014 23:20
Sample Call Data
[
{
"ID":168691,
"Agency":"Media Networks Inc.",
"Client":14726,
"CampaignName":"Aurora Health Care - Plastics\/Cosmetics",
"CampaignId":9485,
"CallDate":"2014-11-04 17:30:00.000",
"TrackingNumber":9205474169,
"TargetNumber":9204574461,
var self = this;
if(!page){
var page = {
id: null,
site: null,
type: null,
name: null,
url: null,
createdAt: moment().format(),
updatedAt: moment().format()
@David-Melo
David-Melo / gist:9837017
Created March 28, 2014 16:31
Goals HTML
<!-- TRACKING GOALS SELECT -->
<table class="table table-hover imp-table">
<thead>
<tr>
<th width="40%">Goal Name</th>
<th width="40%">Goal URL</th>
<th width="20%">Goal Weight (%)</th>
</tr>
<!-- ko ifnot: my.vm.orders.goals.list().length > 0 -->
@David-Melo
David-Melo / gist:9836871
Last active August 29, 2015 13:57
Goals JS Logic
my.vm.orders.goal = function(title,url,weight){
this.title = ko.observable(title);
this.url = ko.observable(url);
this.weight = ko.observable(weight);
};
my.vm.orders.goals = {
type: ko.observable(),
list: ko.observableArray([]),
add: function(){
my.vm.orders.goals.list.push(new my.vm.orders.goal('New Goal','URL',0));
@David-Melo
David-Melo / gist:8528316
Created January 20, 2014 20:22
CGE Main App Logic
var my = my || {};
$("img.gallery-thumb").error(function(a,b) {
$(this).hide();
});
head.ready(function(){
my.vm = (function(){