Skip to content

Instantly share code, notes, and snippets.

View macikokoro's full-sized avatar

Joaquin Guardado macikokoro

View GitHub Profile
@macikokoro
macikokoro / mmm.js
Created January 8, 2015 18:19
mean-median-mode
//Mean=============================
var numArray = [2, 4, 5, 6, 8, 10, 11];
console.log("The array is: " + numArray);
var mean = 0;
for (var i = 0; i < numArray.length; i++) {
mean += numArray[i];
}
//logs the result mean of the array

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

Set up your computer with the following tools:

Latest version of Ruby (for Sass, and other tools) Node.js, PostgreSQL, MongoDB, Redis,

Editors: We use Atom.io or Sublime Text 3 in class, and I'm betting you already do too (unless you rock Vim or Emacs). It has a fully-featured, unlimited time Trial mode.

Optional: if you are coming from an IDE like Visual Studio or Eclipse, you may like WebStorm (trial version) better

Set up your computer with the following tools:

Latest version of Ruby (for Sass, and other tools) Node.js, PostgreSQL, MongoDB, Redis,

Editors: We use Atom.io or Sublime Text 3 in class, and I'm betting you already do too (unless you rock Vim or Emacs). It has a fully-featured, unlimited time Trial mode.

Optional: if you are coming from an IDE like Visual Studio or Eclipse, you may like WebStorm (trial version) better

@macikokoro
macikokoro / powWow.js
Created October 26, 2014 08:06
JS get the power of a number
function powWow (x, y) {
return Math.pow(x, y);
}
console.log(powWow(2, 2));
@macikokoro
macikokoro / reverse.js
Created October 26, 2014 07:49
Reversing a string without using reverse( ).
var string = "Batman";
var reverse = function (string) {
var newString = "";
for (var i = string.length; i >= 0; i--) {
newString += string.charAt(i);
}
return newString;
};
@macikokoro
macikokoro / square.js
Last active August 29, 2015 14:08
Get the square of a number.
var square = function(x) {
return x * x;
};
console.log(square(8));
@macikokoro
macikokoro / triangle.js
Created October 1, 2014 02:00
Looping a triangle
for(var i = "#"; i.length < 8; i += "#")
console.log(i);
controllers.controller('MainCtrl', function($scope, $location, Facebook, $rootScope, $http, $location, Upload, Auth, User, Question, Category, Serie, Record, Location, Popup, Process, Card, Question) {
$scope.$on('authLoaded', function() {
$scope.isExpert($scope.main.serieId);
$scope.isMember($scope.main.serieId);
});
$scope.loadAuth = function() {
Auth.load().success(function(data) {
$scope.main.user = data.user;
$scope.$broadcast("authLoaded");
{
"globals": {
"describe" : false,
"it" : false,
"to" : false,
"ok" : false,
"be" : false,
"before" : false,
"beforeEach" : false,
"after" : false,