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 / azure-cli bash deployment
Created March 17, 2017 02:08
deploy a web app in azure with azure-cli bash
#!/bin/bash
gitdirectory=<Replace with path to local Git repo>
username=<Replace with desired deployment username>
password=<Replace with desired deployment password>
webappname=mywebapp$RANDOM
# Create a resource group.
az group create --location westeurope --name myResourceGroup
@calvimor
calvimor / azure-cli commandos
Last active March 17, 2017 01:47
demo angular JS en azure
// https://docs.microsoft.com/en-us/azure/app-service-web/scripts/app-service-cli-deploy-local-git
=> az login
=> az appservice web deployment user set --user-name [YOUR USERNAME] --password [YOUR PASSWORD]
{
"id": null,
"kind": null,
"location": null,
"name": "web",
"publishingPassword": null,
"publishingPasswordHash": null,
@calvimor
calvimor / comando para cambiar usuario y grupo
Created March 16, 2017 02:33
comando para evitar que wordpress pida datos de conexión FTP
sudo chown -R www-data:www-data /var/www
@calvimor
calvimor / wp-install.sh
Created March 9, 2017 18:47 — forked from cballou/wp-install.sh
Handle a near auto-installation of Wordpress on Ubuntu 14.04.
#!/bin/bash
# MySQL database defaults
dbname="wordpress"
dbuser="wordpress"
# Gather user info
read -r -p "Enter your domain, e.g. mywebsite.co (no http://, no www.): " wpURL
read -r -p "Enter a secure MySQL root password to use (save this somewhere): " rootpass
read -r -p "Enter a secure MySQL WordPress password to use: " userpass
@calvimor
calvimor / mockDataSchema.js
Created January 27, 2017 15:53
Mock Data Schema for "Building a JavaScript Development Environment"
export const schema = {
"type": "object",
"properties": {
"users": {
"type": "array",
"minItems": 3,
"maxItems": 5,
"items": {
"type": "object",
"properties": {
@calvimor
calvimor / .eslintrc.json
Created January 23, 2017 14:58
.eslintrc.json file for "Building a JavaScript Development"
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings"
],
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module"
@calvimor
calvimor / webpack.config.dev.js
Created January 19, 2017 18:10
Development Webpack config for "Building a JavaScript Development Environment"
import path from 'path';
export default {
debug: true,
devtool: 'inline-source-map',
noInfo: false,
entry: [
path.resolve(__dirname, 'src/index')
],
target: 'web',
@calvimor
calvimor / package.json
Created January 18, 2017 15:36
package.json for Building a JS Development Environment
{
"name": "js-dev-environment",
"version": "1.0.0",
"description": "JavaScript development environment",
"scripts": {
},
"author": "Carlos Villamizar",
"license": "MIT",
"dependencies": {
"whatwg-fetch": "1.0.0"
<html>
<head>
<title>API Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
var accessToken = "<your agent's client access token>";
var baseUrl = "https://api.api.ai/v1/";
$(document).ready(function() {
$("#input").keypress(function(event) {
@calvimor
calvimor / git-commands.md
Last active September 11, 2023 01:12
Common Git Commands

Git Commands

Initialize git repo

First of all you have to initialize the repository with git init. You can run this command on an empty directory or not.

Once you have initialized the repo, there is a workflow in git that you should do every time you make changes like add/delete/update files.

git status
git add -A
git commit -m "a little description"