Skip to content

Instantly share code, notes, and snippets.

View afuggini's full-sized avatar

Ariel Fuggini afuggini

View GitHub Profile
@anschaef
anschaef / bootstrap-4-sass-mixins-cheat-sheet.scss
Last active April 12, 2024 08:49
Bootstrap 4 Sass Mixins [Cheat sheet with examples]
/* -------------------------------------------------------------------------- */
// All Bootstrap 4 Sass Mixins [Cheat sheet]
// Updated to Bootstrap v4.5.x
// @author https://anschaef.de
// @see https://github.com/twbs/bootstrap/tree/master/scss/mixins
/* -------------------------------------------------------------------------- */
/*
// ########################################################################## */
// New cheat sheet for Bootstrap 5:

TL;DR

Meteor is great at sharing code between different builds for different platforms. You can use the same source for your browser builds, server builds, your builds for iOS, Android, ... But how to organize your project to be able to orchestrate your builds for different apps and services from the same source? This post elaborates on the reasons why you need these different builds and how you could accomplish this with Meteor easily.

Use cases: Why would you build different apps?

1. Different apps for different roles

Say you have an app with completely different end user experiences depending on their role. It is common practice to have the user logged in, check her authorization (role) and then setup different routes or load different templates to serve that type of user’s needs. While doing so, all types of users load the same build and the app decides what portions of the build to use and what not to use.

var defaults = {
number: 1,
bool: true,
magic: 'real',
animal: 'whale',
croutons: 'delicious'
};
var options = {
number: 2,
@jimthedev
jimthedev / gist:075681f56450b5e684f4
Created August 5, 2014 21:56
genericCollectionFactory.js
.factory('genericCollectionFactory',function(){
function Collection() {
var _items = [];
function get () {
return _items;
}
function add (item) {
Template.foo.helpers({
data1: function(){
var array = [];
var storedData = Session.get("data");
//underscore
_.each(Object.keys(storedData),function(key){
array.push(storedData[key]);
});
return array;
},
#!/bin/bash -x
# useradd -m digilord # Uncomment and change digilord to your username if you want to add a user for yourself
sudo apt-get install build-essential -y
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update -y
sudo apt-get install nodejs -y
sudo apt-get install mongodb -y
@digilord
digilord / new_server.sh
Last active September 18, 2015 07:35
New Digital Ocean server setup for meteor app
#!/bin/bash -x
# useradd -m digilord # Uncomment and change digilord to your username if you want to add a user for yourself
sudo apt-get install build-essential -y
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update -y
sudo apt-get install nodejs -y
sudo apt-get install mongodb -y
@yustam
yustam / redis.config
Last active December 16, 2023 06:45
Install Redis on Elastic Beanstalk
packages:
yum:
gcc-c++: []
make: []
sources:
/home/ec2-user: http://download.redis.io/releases/redis-2.8.4.tar.gz
commands:
redis_build:
command: make
cwd: /home/ec2-user/redis-2.8.4
@danharper
danharper / background.js
Last active March 30, 2024 18:25
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});