Skip to content

Instantly share code, notes, and snippets.

@MadaraUchiha
MadaraUchiha / keybase.md
Created June 16, 2015 10:37
keybase.md

Keybase proof

I hereby claim:

  • I am MadaraUchiha on github.
  • I am madara (https://keybase.io/madara) on keybase.
  • I have a public key whose fingerprint is 666D 2355 5C63 4BE3 47C8 997B 4EAE 165D DCF0 1746

To claim this, I am signing this object:

@MadaraUchiha
MadaraUchiha / 0question.md
Last active August 29, 2015 14:18 — forked from monners/Question.md
Canonical

How do you add a list of image links to a document?

Suppose I have a an array full of image source URLs, like:

var imgs = ['http://lorempizza.com/380/240', 'http://dummyimage.com/250/ffffff/000000', 'http://lorempixel.com/g/400/200/', 'http://lorempixel.com/g/400/200/sports/'];

How do I grab all of those images and insert them into my page at a particular location? Say...

<div id="imageContainer"></div>
@MadaraUchiha
MadaraUchiha / SEChat.js
Last active August 29, 2015 14:18 — forked from caub/SEChat.js
var cheerio = require('cheerio');
var Promise = require("bluebird");
var request = Promise.promisifyAll(require('request'));
var WebSocket = require('ws');
var email = "SE email",
password = "SE pw",
roomid = 17;
var j = request.jar()
// ==UserScript==
// @name Star Thumbnail Expando
// @resource STYLE https://rawgit.com/MadaraUchiha/star-thumn/master/style.css
// @version 0.1
// @match *://chat.stackexchange.com/*
// @match *://chat.stackoverflow.com/*
// @match *://chat.meta.stackexchange.com/*
// @grant GM_addStyle
// @grant GM_getResourceText
// ==/UserScript==
@MadaraUchiha
MadaraUchiha / procedures.js
Last active August 29, 2015 14:17 — forked from krlicmuhamed/config-database.js
Electrolyte usage help
//
//// models/Procedures file
//
'use strict';
//var ioc = require('electrolyte');
var db;
//var database = ioc.create('config/database');

Keybase proof

I hereby claim:

  • I am madarauchiha on github.
  • I am madara (https://keybase.io/madara) on keybase.
  • I have a public key whose fingerprint is F5C5 1884 487E CD0B 5EDC 806C 84E0 C80A 00A9 1D1D

To claim this, I am signing this object:

> $ sudo apt-get update [±master]
Ign http://il.archive.ubuntu.com utopic InRelease
Ign http://il.archive.ubuntu.com utopic-updates InRelease
Ign http://il.archive.ubuntu.com utopic-backports InRelease
Hit http://il.archive.ubuntu.com utopic Release.gpg
Hit http://il.archive.ubuntu.com utopic-updates Release.gpg
Hit http://il.archive.ubuntu.com utopic-backports Release.gpg
@MadaraUchiha
MadaraUchiha / conclusions.md
Last active August 29, 2015 14:12
JavaScript room meeting

Meeting is adjourned. Following are the conclusions to the meeting:

  1. Help vampire treatment status.
  2. Users with low reputation or QA ratio should get a more targetted message
  3. Users who are being obvious help vampires are to be kicked
  4. If another regular is helping a help vampire, please inform them via a separate room
  5. Kicking policy
  6. Announcing kicks is no longer mandatory and should probably be discouraged - opening a room with the user is not obligatory but is nice, a meta post was opened about prompting other room owners but not general users about kicks.
  7. Lemon's 12 days of Christmas
  8. Was awesome
@MadaraUchiha
MadaraUchiha / ajaxformSubmit.js
Last active August 29, 2015 14:08
ajaxFormSubmit.js
/**
* Takes a form node and sends it over AJAX.
* @param {HTMLFormElement} form - Form node to send
* @param {function} callback - Function to handle onload.
* this variable will be bound correctly.
*/
function ajaxFormSubmit (form, callback) {
var url = form.action,
xhr = new XMLHttpRequest();
@MadaraUchiha
MadaraUchiha / main.js
Created September 11, 2014 21:18
My current version of the main JS file. Still in development.
/**
* Created by dor.t on 8/24/2014.
*/
var express = require("express"),
path = require('path'),
Promise = require('bluebird'),
mongo = require('mongodb').MongoClient,
mongoConn,
app = express();