Skip to content

Instantly share code, notes, and snippets.

@freeCodeCamp
freeCodeCamp / gist:2ae74e21567dc3b6ea20
Created December 3, 2014 21:41
responsive iframe for youtube/vimeo videos
#html
<div class="responsive-container">
<iframe src='//player.vimeo.com/video/#{video}', frameborder='0', webkitallowfullscreen='', mozallowfullscreen='', allowfullscreen=''>
</div>
#css
.responsive-container { position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden; }
.responsive-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
<table bgcolor="#f7f7f7" border="0" cellspacing="0" cellpadding="0" style="overflow-x:hidden" width="100%">
<tbody><tr>
<td>
<center>
<table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" style="border-bottom:1px solid #f5f5f5" width="100%">
<tbody><tr>
<td>
User.find({'profile.picture': /twimg.*_normal/}, function (err, users) {
if (err) { debug('Username err: ', err); return next(err); }
for (var i = 0; i < users.length; i++) {
user = users[i];
if (user.profile.picture) {
user.profile.picture = user.profile.picture.replace('_normal', '');
user.save(function(err) {
if (err) { return next(err); }
console.log(user.profile.picture);
done(err, user);
@freeCodeCamp
freeCodeCamp / gist:a6441077db4c08560c1a
Last active August 29, 2015 14:13
Sample Mongo migrations
db.users.find({'profile.picture': /twimg.*_normal/}).forEach( function(user) {
var picture = user.profile.picture.replace(/_normal/, '');
user.profile.picture = picture;
db.users.save( user );
print(user.profile);
});
db.users.find({email: /@twitter.com/}).forEach( function(user) {
var username = user.email.replace('@twitter.com', '');
user.profile.username = username;
An Overview Forum Tools, and Why We Built Our Own
Our chat rooms are a fun place to hang out, make friends, and get fast help. But we've always wanted less syncronous place for our campers to discuss articles and share their projects.
We're Pragmatic Programmers, and wanted to avoid Not Invented Here syndrome to the best of our abilities. So we tried the following:
Reddit Subreddits
Pros:
- Easy to create.
- Free and managed by Reddit.