Skip to content

Instantly share code, notes, and snippets.

View theosp's full-sized avatar

Daniel C theosp

View GitHub Profile
@theosp
theosp / issues-with-sass-and-meteor-v1.4.md
Created February 4, 2017 03:56
Issues with Sass and Meteor v1.4

Sass issues when migrating to Meteor v1.4

  1. Meteor v1.4 uses node v4
  2. fourseven:scss, the package that provides the sass compiler uses node-sass that uses libsass.
  3. Issues with libsass > v3.3 has issues with sass compilation in some edge case, fourseven:scss, falls on that edge case. (see this issue)
  4. libsass is a native node package, and as such need to be compiled (from c code) for the environment it's installed on.
  5. Starting from v1.4 Meteor moved the responsibility of compiling native dependencies from the package developer to the user.
  6. Any attempt to make meteor use a version compiled by me failed.
  7. I had to fine compiled sources
  8. [There were no compiled sources for libsass v3.2 for node v4. v3.2 is the last version that fourseven:scss used before moving to non sass supporting versions.
@theosp
theosp / tap:i18n-feature-proposal.md
Last active August 29, 2015 14:10
tap:i18n feature proposal 1: TAPi18n.loadTranslations

Please comment on this proposal here

TAPi18n.loadTranslations(translations, namespace="project") (Anywhere)

Use translations in addition or instead of the translations defined in the i18n.json files. Translations defined by loadTranslations will have priority over those defined in language files (i18n.json) of namespace (the project, or package name).

To enjoy the benefits of tap:i18n, you should use language

@theosp
theosp / tap-i18n-ready.bash
Last active August 29, 2015 14:07
The migration script to make Telescope tap:i18n ready
#!/bin/bash
keys=("1 notification" "Account" "Add Comment" "Admin" "Administration" "All" "Already have an account?" "A new comment on your post" "Approved" "Are you sure?" "Are you sure you want to delete " "baseScore" "Best" "Bio" "Body" "Categories" "Category" "Change Password?" "clicks" "comment" "Comment" "comments" "Comments" "Comments on my posts" "Created" "Date" "Delete" "Delete Comment" "Delete Post" "Delete User" "Digest" "Discuss" "Display Name" "Don\'t have an account?" "downvote" "Edit" "Edit Account" "Edit profile" "Email" "Email Notifications" "Filter by" "Forgot password?" " has created a new post" " has replied to your comment on" "inactive" "Inactive?" "Invite " "Invite" "Invited" "Invite (none left)" "Is Admin?" "Is Invited?" "Karma" "left" "link" "Loading..." "Load more" "Make admin" "Mark all as read" "Member since" "Menu" "My Account" "Name" "New" "New Password" "New Posts" "Next Day" "No comments." "No notifications" "Note: this post is still pending so it has no submission timestamp
@theosp
theosp / install-meteor-v0.8.3-disable-autoupdate.sh
Created August 27, 2014 07:35
Installs Meteor v0.8.3 and disables autoupdate
#!/bin/sh
# This is the Meteor install script!
# Are you looking at this in your web browser, and would like to install Meteor?
# Just open up your terminal and type:
#
# curl https://install.meteor.com/ | sh
#
# Meteor currently supports:
# - Mac: OS X 10.6 and above
@theosp
theosp / removeTrailingUndefs.js
Created July 25, 2014 06:19
removeTrailingUndefs
removeTrailingUndefs = (arr) ->
while (not _.isEmpty arr) and (_.isUndefined _.last arr)
arr.pop()
return arr
@theosp
theosp / deps-explained.js
Created July 10, 2014 06:57
Meteor Deps mechanism
main.js
-------
Deps.autorun(function () { // (7)
Session.get("session_var"); // (1)
});
Session.set("session_var", "x") // (2)
reactive-dict.js
@theosp
theosp / console.log.coffee
Last active August 29, 2015 14:01
coffee modified console.log
log = ->
console.log.apply @, ["Message"].concat Array.prototype.slice.apply(arguments)
# with date
log = ->
console.log.apply @,
[
"Message", new Date().toISOString().replace(/.*T/, "").replace(/\..*/, "") + ":"
].concat Array.prototype.slice.apply(arguments)
@theosp
theosp / meteor-syslog.js
Created May 12, 2014 06:45
Log meteor output both to stdout and to the syslog
var log = function (message) {
console.log(message);
Npm.require('child_process').exec("logger " + message);
};
@theosp
theosp / developing-meteor
Created April 17, 2014 13:45
Developing meteor
Testing: http://stackoverflow.com/questions/10760601/how-do-you-run-the-meteor-tests
@theosp
theosp / lecture
Last active December 26, 2015 09:39
(Legend: [Slide title | point 1 / point 2...])
[Multiplayer Pong | Rapid Web App Development]
Hello everyone.
My name is Daniel Chcouri.
...
I'll present to you a little multiplayer game, which I've developed as a showcase for rapid web app development, with a very cool stack that includes Node.js, Express and Socket.IO.