Skip to content

Instantly share code, notes, and snippets.

View dvidsilva's full-sized avatar

Daveed Silva dvidsilva

View GitHub Profile
dvidsilva / api.js
Created March 12, 2020 19:10
sample api comms file
import fetch from 'isomorphic-fetch';
const Post = (path, data, extraConfig = {}) => {
return fetch(path, {
method: 'POST',
body: JSON.stringify(data),
headers: {
'Content-Type': 'application/json; charset=utf-8',
'Accept': 'application/json',
const Config = require('../config');
const Mailchimp = require('mailchimp-api-v3');
const mailchimp = Config.MAILCHIMP_API_KEY ? new Mailchimp(Config.MAILCHIMP_API_KEY) : {};
const addSubscriber = (email, data, update) => {
if (!email || !Config.MAILCHIMP_API_KEY || !Config.MAILCHIMP_LIST_ID) {
const msg = `Ignoring adding subscriber, missing params ${!email ? 'email': 'config'}`;
return Promise.resolve({ msg });

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

dvidsilva / .vimrc
Created August 22, 2017 03:24
.vimrc files
" don't bother with vi compatibility
set nocompatible
" enable syntax highlighting
syntax enable
" configure Vundle
filetype on " without this vim emits a zero exit status, later, because of :ft off
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
var movies = [
title: 'titanic', year: 2000
title: 'robocop', year: 1990
dvidsilva / fbtoform.js
Last active May 10, 2021 08:55
HTMLForm to Firebase sample
var newscript = document.createElement('script');
newscript.type = 'text/javascript';
newscript.async = true;
newscript.src = '';
_setFormData = function setFormData (sel, data) {'setting form to data', data);
dvidsilva / patch.notes.diablo.3
Created January 12, 2016 21:17
Patch 2.4.0 Now Live
Kauza 1/12/2016 3
Patch 2.4.0 Now Live
Diablo III patch 2.4.0 is now live in the Americas for PC, PlayStation 4, and Xbox One! Check out the full PC patch notes below to learn all about the latest changes. To view our console patch notes, click here.
Important: Please note that you will not be prompted to download patch 2.4.0 until the patch is live in your home region. If you are logging in from a European or Asian client, you will need to wait for this patch to release in that region before it can be installed. Additionally, if your home region is in the Americas, you will be unable to log into Europe or Asia using Global Play after patch 2.4.0 is live until those regions have also patched.
Diablo III Patch 2.4.0 - v2.4.0.35057
dvidsilva / submit.js
Created October 20, 2015 19:04
AJAX submit form with Jquery
$(document).ready(function() {
$('form').submit(function(event) {
var formData = $(this).serialize();
type : 'POST',
url : $(this).attr('action'),
data : formData,
dataType : 'json',
encode : true
// loveWins(): a simple function that accepts a UIImage and
// returns the same image blended with the rainbow flag
// of the LGBT pride movement.
// This is released for pedagogical reasons (I've tried to make
// the code as easy to follow as possible!) but you're welcome
// to use it for any purpose – consider the code yours.
// If you're using Xcode 7 / Swift 2, you need to make a tiny
dvidsilva /
Last active March 8, 2020 15:44
Challenge #213 [Easy] Pronouncing Hex


The HBO network show "Silicon Valley" has introduced a way to pronounce hex.

Kid: Here it is: Bit… soup. It’s like alphabet soup, BUT… it’s ones and zeros instead of letters.
Bachman: {silence}
Kid: ‘Cause it’s binary? You know, binary’s just ones and zeroes.
Bachman: Yeah, I know what binary is. Jesus Christ, I memorized the hexadecimal 
                    times tables when I was fourteen writing machine code. Okay? Ask me 

what nine times F is. It’s fleventy-five. I don’t need you to tell me what