Skip to content

Instantly share code, notes, and snippets.

View CatinhoCR's full-sized avatar

Cato CatinhoCR

  • Costa Rica
  • 07:27 (UTC -06:00)
View GitHub Profile
*,: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
@CatinhoCR
CatinhoCR / form-validation-advanced.js
Created September 18, 2020 13:09 — forked from TCotton/form-validation-advanced.js
A JavaScript reusable form class
/* See blog post for details: http://www.suburban-glory.com/blog?page=173 */
;(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");
@CatinhoCR
CatinhoCR / SETUP.md
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 https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

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

@CatinhoCR
CatinhoCR / WP project setup
Created June 16, 2018 05:50
Command Line prompts to create a WP project quickly with Sage 9 starter theme.
mkdir project-name
cd project-name
wp core download
wp config create --dbname=dbname --dbuser=user --dbpass=pass --dbprefix=pref
wp core install --url=example.dev --title=Title --admin-user=username --admin-password=password --admin-email=example@example.com
cd wp-content/themes
composer create-project roots/sage theme-name
npm install
yarn && yarn build
@CatinhoCR
CatinhoCR / angular-cli-update.md
Last active February 22, 2018 22:53
Updating angular cli globally and locally

Globally

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

Local Project Version

rm -rf node_modules
@CatinhoCR
CatinhoCR / Add_Existing_Project_To_Git.md
Created December 11, 2017 07:14 — forked from alexpchin/Add_Existing_Project_To_Git.md
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
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: https://coderwall.com/p/r_bvhg/angular-ui-bootstrap-alert-service-for-angular-js. No $rootScopes were harmed in the making of this code.
(function () {
'use strict';
angular.module('myApp')
.controller('SomeCtrl', SomeCtrl);
SomeCtrl.$inject = ['$scope', '$http', ' alertService'];
function SomeCtrl($scope, $http, alertService) {
$http.put('http://some.url/user/44', {