Skip to content

Instantly share code, notes, and snippets.

❤️
Enamorao

Dvid Silva dvidsilva

❤️
Enamorao
Block or report user

Report or block dvidsilva

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mc.js
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'}`;
console.warn(msg);
return Promise.resolve({ msg });
View Effective_Engineer.md

Effective Engineer - Notes

What's an Effective Engineer?

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

Adopt the Right Mindsets

View .vimrc
" 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
View examples.js
var movies = [
{
title: 'titanic', year: 2000
},
{
title: 'robocop', year: 1990
}];
@dvidsilva
dvidsilva / fbtoform.js
Last active Aug 1, 2019
HTMLForm to Firebase sample
View fbtoform.js
(function(){
var newscript = document.createElement('script');
newscript.type = 'text/javascript';
newscript.async = true;
newscript.src = 'https://www.gstatic.com/firebasejs/3.0.2/firebase.js';
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(newscript);
})();
_setFormData = function setFormData (sel, data) {
console.info('setting form to data', data);
View patch.notes.diablo.3
DATA HOSTED WITH ♥ BY PASTEBIN.COM - DOWNLOAD RAW - SEE ORIGINAL
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
dvidsilva / submit.js
Created Oct 20, 2015
AJAX submit form with Jquery
View submit.js
$(document).ready(function() {
$('form').submit(function(event) {
event.preventDefault();
var formData = $(this).serialize();
$.ajax({
type : 'POST',
url : $(this).attr('action'),
data : formData,
dataType : 'json',
encode : true
View gist:d43162c39f0a77e8ae16
//
// 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
dvidsilva / description.md
Last active Aug 29, 2015
Challenge #213 [Easy] Pronouncing Hex
View description.md

Description

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 
@dvidsilva
dvidsilva / appendscript.js
Last active Aug 29, 2015
Add a js file based ona variable
View appendscript.js
document.addEventListener("DOMContentLoaded", function() {
var src, scriptTag;
src = "./app.js"; // here goes the name of the file to include
scriptTag = document.createElement('SCRIPT');
scriptTag.src = src;
document.body.appendChild(scriptTag);
});
You can’t perform that action at this time.