Skip to content

Instantly share code, notes, and snippets.

View baskeboler's full-sized avatar
🏠
Working from home

Victor Gil baskeboler

🏠
Working from home
View GitHub Profile
@baskeboler
baskeboler / mac-os-sierra-virtualbox.md
Last active July 21, 2017 02:03
install mac os sierra virtual machine
$ vagrant init jhcook/macos-sierra
$ vagrant up

(I got errors while starting the virtual machine, fixed it opening Virtualbox and editing the generated virtual machine's settings. I disabled nested pagination from the System -> Acceleration menu)

After that the vm booted without problems and I was able to successfully install xcode.

@baskeboler
baskeboler / isIPhone6PlusOrHigher.js
Last active December 27, 2016 05:29
checking if we are on iphone 6 plus or higher with cordova device.model
var modelString = device.model;
var modelRegex = /\d+/g;
var isIPhone6PlusOrHigher = false;
var match = modelString.match(modelRegex);
if (match != null) {
var major = match[0], minor = match[1];
if (major == 7) {
if (minor != 2) {
// iphone 6 plus
isIPhone6PlusOrHigher = true;
@baskeboler
baskeboler / inheritance.js
Last active August 29, 2015 14:22
Javascript inheritance and polymorphism
var Person = function (name) {
this.name = name;
}
Person.prototype = {
sayHi: function() {
console.log('Hi, my name is ' + this.name);
},
parentClassMethod: function() {
console.log('Method from Person class called on ' + this.name);
@baskeboler
baskeboler / controller.js
Created May 15, 2015 10:27
angular controller
(function() {
'use strict';
angular.module('App').controller('Ctrl', Ctrl);
Ctrl.$inject = [];
function Ctrl() {
var vm = this;
}
})();