Skip to content

Instantly share code, notes, and snippets.

Avatar

Carlos Alberto Villamizar Morantes calvimor

View GitHub Profile
@calvimor
calvimor / media-moda-y-mediana.py
Created Sep 28, 2017
Repasando conceptos básicos | Estadística
View media-moda-y-mediana.py
import statistics as stats
numbersMean = [1525, 257, 378, 9543, 7854, 152]
numbersMode = [9, 5, 9, 4, 3, 6, 7, 1, 2, 3, 9, 1, 2]
numbersMedian = [9, 5, 9, 4, 3, 6, 7, 1, 2, 3, 9, 1, 2]
print(stats.mean(numbersMean))
print(stats.mode(numbersMode))
@calvimor
calvimor / Setup of Development Environment.md
Created Sep 25, 2017
Setup of Development Environment wiht blockchain
View Setup of Development Environment.md
@calvimor
calvimor / php.ini
Created Sep 22, 2017
Variables php ini for working with WordPress
View php.ini
max_execution_time=500
post_max_size=50M
upload_max_filesize=50M
@calvimor
calvimor / net core spa template
Last active Sep 11, 2017
net core spa template
View net core spa template
mkdir Demoapp
cd Demoapp
dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
dotnet new angular
dotnet restore
npm install
@calvimor
calvimor / git commands in forked repos.md
Created Sep 11, 2017
git commands in forked repository (upstream and origin)
View git commands in forked repos.md

Crear ó entrar a la carpeta del proyecto $ git remote add origin [HTTPS ó SSH del proyecto forked] $ git remote add upstream [HTTPS ó SSH del proyecto principal] $ git fetch upstream $ git merge origin/upstream $ git fetch origin $ git merge origin/master Hacer cambios en local $ git fetch upstream $ git merge origin/upstream

@calvimor
calvimor / wordpress-change-domain-migration.sql
Created Sep 8, 2017 — forked from chuckreynolds/wordpress-change-domain-migration.sql
Use this SQL script when changing domains on a WordPress site. Whether you’re moving from an old domain to a new domain or you’re changing from a development domain to a production domain this will work. __STEP1: always backup your database. __STEP2: change the ‘oldsite.com’ and ‘newsite.com’ variables to your own. __STEP3: make sure your databa…
View wordpress-change-domain-migration.sql
SET @oldsite='http://oldsite.com';
SET @newsite='http://newsite.com';
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite);
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite);
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite);
/* only uncomment next line if you want all your current posts to post to RSS again as new */
#UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite);
View installation.md

Requirement //6.9.1 or higher

##Installing the Angular CLI
```npm install –g @angular/cli

##Verifying the Angular CLI Version
```ng -v
View setup sails api
** Install Salis MVC Framework **
npm install sails -g
** Creata a new directory for the project **
** Create sails api project into new folder ** with this command ```sails new -no-frontend
** Run Sails app ** with command ```sails lift
** Create a user api ** with ```sails generate api user
View null-coalesce-operator.php
<?php
if(isset($_GET['name'])) {
$name = $_GET{'name'];
}
else {
$name = '(unknown)';
}
//Other option to get name
$name = $_GET['name'] ?: '(unknown)';
@calvimor
calvimor / common component blueprint options
Last active Apr 10, 2017
Options to configure the angular CLI
View common component blueprint options
OPTION ALIAS DESCRIPTION
--flat Should a folder be created?
--inline-template -it Will the template be in the .ts file?
--inline-style -is Will the style be in the .ts file?
--spec Generate a spec?
--view-encapsulation -ve View encapsulation strategy
--change-detection -cd Change detection strategy
--dry-run -d Report the files, don’t write them
You can’t perform that action at this time.