Skip to content

Instantly share code, notes, and snippets.

View rjdscott's full-sized avatar

Rob Scott rjdscott

  • New York, New York
View GitHub Profile
@rjdscott
rjdscott / VBA_ScatterPlotFormatter.bas
Last active March 22, 2016 06:11
VBA: Loops through scatterplot charts and applies predefined settings. Used as a workflow enhancement tool
Option Explicit
Sub ScatterPlotFormatter()
'--------------------------------------------------------------------------------------------------------
' Author: Rob Scott
' Date Created: 17th March 2016
' Purpose: Formats all chart objects on the page by adding titles, formatting lines and markers along
' with gridlines. The final section resizes charts and positions them to the left of the page
'--------------------------------------------------------------------------------------------------------
@psi-4ward
psi-4ward / GridStream.js
Created October 22, 2013 11:28
NodeJS MongoDB-GridFS Video range stream example Lets your browser seek/jump wihin the video-playback.
var app = require('express')();
var GridStore = require('mongodb').GridStore;
var ObjectID = require('mongodb').ObjectID;
var MongoClient = require('mongodb').MongoClient;
var Server = require('mongodb').Server;
var dbConnection;
MongoClient.connect("mongodb://localhost:27017/ersatz?auto_reconnect", {journal: true}, function(err, db) {
dbConnection = db;
app.listen(3000);
@rjdscott
rjdscott / HTML Form
Last active December 15, 2015 16:29
For anyone wanting to learn how to link a PHP email sending function to your Bootstrap website, below is a very basic outline. It is only to help you understand how it works.
<div class="container contact-form">
<div class="row">
<form method="POST" action="contact.php" class="theme-form">
<div class="span3">
<input type="text" placeholder="Name" name="contact_name" class="required" id="name-field">
</div>
<div class="span3">
<input type="email" placeholder="Email" name="contact_email" class="email required" id="email-field">
</div>
<div class="span3">
@baali
baali / dlAttachments.py
Created May 8, 2012 08:32
Python script to download all gmail attachments.
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail
# Make sure you have IMAP enabled in your gmail settings.
# Right now it won't download same file name twice even if their contents are different.
import email
import getpass, imaplib
import os
import sys
detach_dir = '.'
@paolorossi
paolorossi / html5-video-streamer.js
Created March 7, 2012 13:21
Node.js HTML5 video streamer
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
@jasonrdsouza
jasonrdsouza / gmail.py
Created January 25, 2012 04:52
Python script to access a gmail account and download particular emails
import email, getpass, imaplib, os
detach_dir = '.' # directory where to save attachments (default: current)
user = raw_input("Enter your GMail username:")
pwd = getpass.getpass("Enter your password: ")
# connecting to the gmail imap server
m = imaplib.IMAP4_SSL("imap.gmail.com")
m.login(user,pwd)
m.select("cs2043") # here you a can choose a mail box like INBOX instead