Skip to content

Instantly share code, notes, and snippets.

View CatinhoCR's full-sized avatar

Cato CatinhoCR

  • Costa Rica
  • 19:16 (UTC -06:00)
View GitHub Profile
@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 / 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', {