Skip to content

Instantly share code, notes, and snippets.

View aitoroses's full-sized avatar

Aitor Oses aitoroses

View GitHub Profile
@aitoroses
aitoroses / organization.txt
Created March 5, 2014 22:55
Meteor App organization
As in the unofficial meteor faq, I think it pretty much explains how do structure a large app:
Where should I put my files?
The example apps in meteor are very simple, and don’t provide much insight. Here’s my current thinking on the best way to do it: (any suggestions/improvements are very welcome!)
lib/ # <- any common code for client/server.
lib/environment.js # <- general configuration
lib/methods.js # <- Meteor.method definitions
lib/external # <- common code from someone else
## Note that js files in lib folders are loaded before other js files.
package com.nicequestion.donatas.adf;
import oracle.adf.view.rich.context.AdfFacesContext;
/** Base generic implementation of ADF flow scoped bean data control.
*
* Note: specific design and naming convention is applied:
* the type T must be defined as managed bean (name flowController, scope pageFlow)
* in a bounded task flow definition.
*

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
AboutIE7.js is a JavaScript library to make Microsoft Internet Explorer behave like a standards-compliant browser. It fixes many HTML and CSS issues and makes transparent PNG work correctly under IE5 and IE6. StatusCurrent version: 2.1 beta4. UsageIE7.jsUpgrade MSIE5.5-6 to be compatible with MSIE7. <!--[if lt IE 7]><script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE7.js"></script><![endif]-->IE8.jsUpgrade MSIE5.5-7 to be compatible with MSIE8.

Better Git log

git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

create an alias git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"

git lg

git lg -p

@aitoroses
aitoroses / Integrations.js
Created June 2, 2014 13:14
Things I would like to integrate in future projects
- koa.js
- socket.io 1.0
- Famo.us
- Famo.us-Angular
- http-api-design
- New testing practices
- CO-routines and Thunkify
- Generators
- ES6 --harmony
- LiveScript
#!/bin/sh
VERSION=0.8.6
PLATFORM=darwin
ARCH=x64
PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH"
mkdir -p "$PREFIX" && \
curl http://nodejs.org/dist/v$VERSION/node-v$VERSION-$PLATFORM-$ARCH.tar.gz \
| tar xzvf - --strip-components=1 -C "$PREFIX"
@aitoroses
aitoroses / MultiCheckboxDirective.js
Created September 16, 2014 18:56
A directive to pipe multiple checkbox values into the same property.
/**
* @author Aitor Osés Martín
* @description Directive for controlling a
* set of checkboxes inside a single property
* @url http://jsfiddle.net/murray900/Lz6qbkf0/13/
*/
var app = angular.module('main', []);
app.controller('outerCtrl', function ($scope) {