Skip to content

Instantly share code, notes, and snippets.


Cato CatinhoCR

  • Costa Rica
  • 13:56 (UTC -06:00)
View GitHub Profile
CatinhoCR / SomeCtrl.js
Created September 20, 2017 03:52 — forked from seyDoggy/SomeCtrl.js
My version of the AngularJS ui-bootstrap alert service as derived from here: No $rootScopes were harmed in the making of this code.
View SomeCtrl.js
(function () {
'use strict';
.controller('SomeCtrl', SomeCtrl);
SomeCtrl.$inject = ['$scope', '$http', ' alertService'];
function SomeCtrl($scope, $http, alertService) {
$http.put('http://some.url/user/44', {
CatinhoCR /
Created December 11, 2017 07:14 — forked from alexpchin/
Add Existing Project To Git Repo

#Adding an existing project to GitHub using the command line

Simple steps to add existing project to Github.

1. Create a new repository on GitHub.

In Terminal, change the current working directory to your local project.

##2. Initialize the local directory as a Git repository.

git init
CatinhoCR /
Last active February 22, 2018 22:53
Updating angular cli globally and locally


npm uninstall -g angular-cli
npm cache clean
npm install -g @angular/cli@latest

Local Project Version

rm -rf node_modules
CatinhoCR / WP project setup
Created June 16, 2018 05:50
Command Line prompts to create a WP project quickly with Sage 9 starter theme.
View WP project setup
mkdir project-name
cd project-name
wp core download
wp config create --dbname=dbname --dbuser=user --dbpass=pass --dbprefix=pref
wp core install --title=Title --admin-user=username --admin-password=password
cd wp-content/themes
composer create-project roots/sage theme-name
npm install
yarn && yarn build
CatinhoCR /
Created July 18, 2020 23:06
Quick Mac Web Development Environment Setup with Brew, Node, PHP, Composer, MySQL and Valet.

Use to easily setup your macbook's environment

1. Install Homebrew

/bin/bash -c "$(curl -fsSL"

If Xcode is not installed, you'll be prompted to install it. Go.

CatinhoCR / form-validation-advanced.js
Created September 18, 2020 13:09 — forked from TCotton/form-validation-advanced.js
A JavaScript reusable form class
View form-validation-advanced.js
/* See blog post for details: */
;(function(window, document, undefined) {
// for browsers without navite bind support
if (!Function.prototype.bind) {
Function.prototype.bind = function(oThis) {
if (typeof this !== "function") {
// closest thing possible to the ECMAScript 5 internal IsCallable function
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
View brain-gym.min.css
*,:after,:before{box-sizing:border-box;margin:0;padding:0}body,html{font-feature-settings:"liga" 1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility;-webkit-text-size-adjust:100%;background-color:#f7f7f7;font-family:Open Sans,sans-serif;font-size:10px;letter-spacing:0;line-height:1.5}img{display:block;height:auto;max-width:100%;transition:all .2s linear;width:auto}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}tr{border-bottom:1px solid #ccc}td,th{padding:4px;text-align:left}code,kbd,pre,samp{font-family:monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}button{border:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-m