Skip to content

Instantly share code, notes, and snippets.

View calvimor's full-sized avatar

Carlos Alberto Villamizar Morantes calvimor

View GitHub Profile
@calvimor
calvimor / config-git.md
Last active October 5, 2016 15:15
Configuring git

Configuring Git

Global

git config --global user.name calvimor
git config --global user.email calvimor@gmail.com

git config --global core.editor vim|atom

git config --global core.autocrlf true|false|input
var Book = function (name, price) {
var priceChanging = [],
priceChanged = [];
this.name = function (val) {
return name;
};
this.price = function (val) {
if(val !== undefined && val !== price) {
for (var i = 0; i < priceChanging.length; i++) {
// Code goes here
var Calc = function (start) {
var that = this;
this.add = function(x) {
start = start + x;
return that;
};
this.multiply = function (x) {
function myFunc() {
var x = 0;
for (var i = 0; i < arguments.length; i++) {
x = x + arguments[i];
}
return x;
}
'use strict';
class Animal {
constructor (voice) {
this.voice = voice || 'Grunt';
}
speak() {
return this.voice;
}
}
@calvimor
calvimor / prototype-chain.js
Last active September 20, 2016 12:47
Requirements for prototype chain in JS
'use strict';
function Animal (voice) {
this.voice = voice || 'Grunt'
}
Animal.prototype.speak = function () {
display(this.voice)
}
@calvimor
calvimor / WSSoapClient.php
Created September 12, 2016 21:05 — forked from johnkary/WSSoapClient.php
WS-Security for PHP SoapClient
<?php
/**
* Copyright (c) 2007, Roger Veciana
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this
@calvimor
calvimor / index.php
Created June 23, 2016 22:36
Index tema de WP
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* e.g., it puts together the home page when no home.php file exists.
*
* Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
@calvimor
calvimor / bloginfo
Created June 23, 2016 21:59
Parametros de bloginfo
//función bloginfo https://developer.wordpress.org/reference/functions/bloginfo/
Possible values for $show #
‘name‘ – Displays the “Site Title” set in Settings > General. This data is retrieved from the “blogname” record in the wp_options table.
‘description‘ – Displays the “Tagline” set in Settings > General. This data is retrieved from the “blogdescription” record in the wp_options table.
‘wpurl‘ – Displays the “WordPress address (URL)” set in Settings > General. This data is retrieved from the “siteurl” record in the wp_options table. Consider echoing site_url() instead, especially for multi-site configurations using paths instead of subdomains (it will return the root site not the current sub-site).
‘url‘ – Displays the “Site address (URL)” set in Settings > General. This data is retrieved from the “home” record in the wp_options table. Consider echoing home_url() instead.
‘admin_email‘ – Displays the “E-mail address” set in Settings > General. This data is retrieved from the “admin_email” record in the
@calvimor
calvimor / style.css
Created June 23, 2016 21:51
Encabezado de nuevo tema wp
/*
Theme URI: http://wordpress.org/themes/twentythirteen
Author: the WordPress team
Author URI: http://wordpress.org/
Description: The 2013 theme for WordPress takes us back to the blog, featuring a full range of post formats, each displayed beautifully in their own unique way. Design details abound, starting with a vibrant color scheme and matching header images, beautiful typography and icons, and a flexible layout that looks great on any device, big or small.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, flexible-width, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready
Text Domain: twentythirteen