Skip to content

Instantly share code, notes, and snippets.

[
{
"_id": "LJNnpzMtgHu4mra3Q",
"statusCode": 200,
"content": "{\"page\":\"1\",\"per_page\":12,\"pages\":50,\"total\":600,\"shots\":[{\"id\":1482504,\"title\":\"All of the Pixels\",\"height\":600,\"width\":800,\"likes_count\":316,\"comments_count\":17,\"rebounds_count\":0,\"url\":\"http://dribbble.com/shots/1482504-All-of-the-Pixels\",\"short_url\":\"http://drbl.in/kCnK\",\"views_count\":2115,\"rebound_source_id\":null,\"image_url\":\"http://d13yacurqjgara.cloudfront.net/users/13774/screenshots/1482504/luma.jpg\",\"image_teaser_url\":\"http://d13yacurqjgara.cloudfront.net/users/13774/screenshots/1482504/luma_teaser.jpg\",\"image_400_url\":\"http://d13yacurqjgara.cloudfront.net/users/13774/screenshots/1482504/luma_1x.jpg\",\"player\":{\"id\":13774,\"name\":\"Justin Mezzell\",\"location\":\"Orlando, FL\",\"followers_count\":17388,\"draftees_count\":8,\"likes_count\":3696,\"likes_received_count\":65672,\"comments_count\":784,\"comments_received_count\":4346,\"rebounds_count\":5,\"rebounds_received_
I recently changed the time/date on my server to try and deal with timezone issues, and MeteorUp seems not to have liked that.
```
tar: bundle/programs/server/start.sh: time stamp 2014-05-21 00:57:07 is 55.26219052 s in the future
tar: bundle/programs/server: time stamp 2014-05-21 00:57:07 is 55.262111128 s in the future
tar: bundle/programs: time stamp 2014-05-21 00:57:05 is 53.262037846 s in the future
tar: bundle/server/.bundle_version.txt: time stamp 2014-05-21 00:57:09 is 57.261902421 s in the future
tar: bundle/server: time stamp 2014-05-21 00:57:09 is 57.261823251 s in the future
tar: bundle/star.json: time stamp 2014-05-21 00:57:09 is 57.261665531 s in the future
@SachaG
SachaG / gist:17f6d55be78c63174ec9
Created July 2, 2014 09:23
Front email forwarding error
This is the mail system at host eforward3e.registrar-servers.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
@SachaG
SachaG / gist:d57fccc728dd2959f8d0
Last active August 29, 2015 14:03
Iron Router subscription loading pattern
// Global data controller
DataController = RouteController.extend({
onBeforeAction: function(pause) {
var loading = false, notFound = false;
_.each(this.routeData(), function (dataItem) {
var handle = dataItem.subscription;
@SachaG
SachaG / gist:279e6452d45128b08b06
Created August 25, 2014 02:14
template highlighting
var oldCreate = Template.__create__;
Template.__create__ = function(viewName) {
var tmpl = oldCreate.apply(this, arguments);
var oldRender = tmpl.__render;
tmpl.__render = function() {
var className = viewName.replace('Template.', 'template-highlight ');
return HTML.SPAN({class: className}, oldRender.apply(this, arguments));
}
return tmpl;

Hello,

Many times, we see smaller sized droplets run out of memory due to the number of processes that are running. This can cause slow connections, services to crash and overall unpredictable behavior.

Potential solutions are:

  1. Upsize to a larger server. We recommend at least a 1GB droplet for any server utilizing a MySQL database.

  2. Enable swap (search for 'swap' in our articles https://digitalocean.com/community)

var capitaliseFirstLetter = function (string){
return string.charAt(0).toUpperCase() + string.slice(1);
}
var buildTwitterLink = function (text, url) {
var encodedUrl = encodeURIComponent(url);
var referrer = encodeURIComponent("http://communitybuildingguide.com");
// var url = "http%3A%2F%2Fbook.discovermeteor.com%2Fstarter%3Futm_source%3Dstarter%26utm_medium%3Dtwitter%26utm_campaign%3Dstarter_tweet";
return "https://twitter.com/intent/tweet?original_referer="+referrer+"&url="+encodedUrl+"&text="+encodeURIComponent(text)+"&hashtags=combuild&via=telescopeapp";
}
Users.getDisplayName = function (user) {
console.log(user)
console.log(this)
return (user.telescope && user.telescope.displayName) ? user.telescope.displayName : Users.getUserName(user);
};
Users.helpers({
getDisplayName: function () {
return Users.getDisplayName(this);
}
@SachaG
SachaG / feed
Last active August 29, 2015 14:25
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Screenings]]></title><description><![CDATA[The best design videos]]></description><link>http://apple.com/p</link><image><url>http://apple.com/pimg/favicon.png</url><title>Screenings</title><link>http://apple.com/p</link></image><generator>RSS for Node</generator><lastBuildDate>Sat, 18 Jul 2015 01:55:41 GMT</lastBuildDate><atom:link href="http://apple.com/pfeed.xml" rel="self" type="application/rss+xml"/><imageUrl>http://www.bar.com/</imageUrl><item><title><![CDATA[How Designers Destroyed the World]]></title><description><![CDATA[You are directly responsible for what you put into the world. Yet every day designers all over the world work on projects without giving any thought or consideration to the impact that work has on the world around them. This needs to change.</br></br><a href="http
if (Meteor.is_client) {
SimpleRouter = FilteredRouter.extend({
initialize: function() {
FilteredRouter.prototype.initialize.call(this);
this.filter(this.require_login, {only: ['submit']});
},
require_login: function(page) {
console.log(Meteor.user());
if (Meteor.user()) {
return page;