Skip to content

Instantly share code, notes, and snippets.

View LeCoupa's full-sized avatar
:octocat:
Keep pushing ⚡️

Julien Le Coupanec LeCoupa

:octocat:
Keep pushing ⚡️
View GitHub Profile
# Meteor & Spooky Bootstrap. (Growth Hacking)
# You may also be interested by the PhantomJS, CasperJS & Spooky CheatSheet
# https://gist.github.com/LeCoupa/10008302
# Choose XPath over CSS3 selectors it's much more powerful and less buggy
# https://gist.github.com/LeCoupa/8c305ec8c713aad07b14
# Use Meteor-NPM to install these npm packages
<template name="SignIn">
<form action="/signin" id="signInForm" method="post">
<input id="signInEmail" type="text" name="email" placeholder="Email Address">
<input id="signInPassword" type="password" name="password" placeholder="Password">
<input class="btn-submit" type="submit" value="Sign In">
</form>
<!-- end #sign-in-form -->
</template>
@LeCoupa
LeCoupa / meteor-reactive-nonreactive-join.html
Last active February 27, 2020 05:53
Meteor: Reactive and Nonreactive Join with MongoDB --> https://github.com/LeCoupa/awesome-cheatsheets
<!--
The examples below illustrate different ways to make a reactive and nonreactive join between two collections.
We will retrieve in all of them a list of the 10 most popular posts along with their author profile.
More informations are available on: http://journal.gentlenode.com/
Summary:
1. Nonreactive Join #1: Denormalization.
2. Reactive Join #1: Joining on the client. (by calling a publication)
3. Reactive Join #2: Overpublishing. (and joining with data context)
@LeCoupa
LeCoupa / meteor-mongo-oplog-ubuntu.bash
Last active February 27, 2020 05:54
Meteor: Set up Oplog Tailing on Ubuntu --> https://github.com/LeCoupa/awesome-cheatsheets
# How to set up Oplog Tailing on your Meteor application on Ubuntu. (production environment)
# We are going to create a replica set with only one member (the primary) so as to benefit from oplog tailing.
# More: https://github.com/meteor/meteor/wiki/Oplog-Observe-Driver
# 1. Stop MongoDB
$ sudo service mongodb stop
# This little gist shows how to easily internationalize your application using the meteor-just-i18n package.
# Package repository: https://github.com/subhog/meteor-just-i18n/
# 1. Adding the package.
$ meteor add anti:i18n
<template name="SignOut">
<div class="connected">
<span class="welcome">Welcome New Meteorite!</span>
<a class="sign-out" href="/" id="signOut">Sign Out</a>
</div>
<!-- end .connected -->
</template>
<template name="SignUp">
<form action="/sign-up" id="signUpForm" method="post">
<input id="signUpEmail" name="email" placeholder="Email Address" type="text" >
<input id="signUpPassword" name="password" placeholder="Password" type="password">
<input id="signUpPasswordConfirm" name="password-confirm" placeholder="Confirm" type="password">
<input class="btn-submit" type="submit" value="Join Meteorites!">
</form>
<!-- end #sign-up-form -->
@LeCoupa
LeCoupa / fake-referer.casper.coffee
Last active October 21, 2020 10:43 — forked from papoms/fake-referrer.casper.js
How to fake the HTTP referer with CasperJS --> https://github.com/LeCoupa/awesome-cheatsheets
# Define Variables + Casper Initialization
fakeReferer = 'https://google.com/'
targetUrl = 'https://facebook.com/'
casper = require('casper').create()
# Fake the referer
casper.start fakeReferer, ->
# METEOR CORE:
Anywhere: Meteor.isClient
Anywhere: Meteor.isServer
Anywhere: Meteor.startup(func)
Anywhere: Meteor.absoluteUrl([path], [options])
Anywhere: Meteor.settings
Anywhere: Meteor.release
# add the email package
meteor add email