Skip to content

Instantly share code, notes, and snippets.

View sagaban's full-sized avatar
🦆
Enjoying life

Santiago Bandiera sagaban

🦆
Enjoying life
View GitHub Profile
@sagaban
sagaban / application.controller.js
Created June 2, 2016 06:48 — forked from Serabe/application.controller.js
Named Positional Parameters
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
currentBooleanValue: false,
obj: Ember.Object.create({
a: 1,
b: 2,
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Component.extend({
myArr: Ember.K,
actions: {
addNumber() {
let random = Math.ceil(10 * Math.random());
this.get('myArr').pushObject(random);
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super(...arguments);
console.log(this.get('myArr'))
},
myArr: Ember.A([]),
actions: {
var fullname = 'John Doe';
var obj = {
fullname: 'Colin Ihrig',
prop: {
fullname: 'Aurelio De Rosa',
getFullname: function() {
return this.fullname;
}
}
};
(function (/* 01. reduce (v, fn, b) */) {
var reduce = function (v, fn, b) {
return reduceAux (v, fn, b, 0, b);
};
var reduceAux = function (v, fn, b, p, ac){
return p > v.length - 1 ?
ac :
function talk(){
console.log(this.sound);
}
let animal = {
talk
};
let cat = {
sound: "Miau!"
@sagaban
sagaban / components.accordion-item.js
Created November 16, 2016 08:23
Accordion-example
import Ember from 'ember';
export default Ember.Component.extend({
});
KEYBINDINGS
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings
are:
F2 - Create a new window
F3 - Move to previous window
F4 - Move to next window
#!/bin/bash
# Check package availability
command -v docker-compose >/dev/null 2>&1 || { echo "[Error] Please install docker-compose"; exit 1; }
command -v gzip >/dev/null 2>&1 || { echo "[Error] Please install gzip"; exit 1; }
# Change to the script's directory & create directory
cd $(dirname "$(readlink -f "$0")")
mkdir -p ./dbdumps